跳到正文

个人记录

整数转换进制

tanyixuan1010约 1 分钟
原文
文章信息与版本

文章信息

发布
2023年9月13日
收录
2026年9月6日
更新
2026年11月6日
篇幅
约 1 分钟

版本

  1. v1当前
C++
#include<bits/stdc++.h>
using namesapce std;
int a[1e8];
  int main(){
  int x=0;
  int n;
  int b;
  scanf("%d%d",&n&b);
  while(n!=0){
  	a[x]=n%b;
  x++;
  n/=b;
  
  }
  return 0;
  }
  
原文