Run ID:162716

提交时间:2026-10-18 14:52:53

#include<bits/stdc++.h> using namespace std; int s[70]; int main(){ long long a,k=0,b; cin>>a>>b; if(a==0){ cout<<0; return 0; } while(a>0){ s[k]=a%b; a/=b; k++; } for(int j=k-1;j>=0;j--){ if(s[j]>=10) cout<<char((s[j]+55)); else cout<<s[j]; } return 0; }