| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 169346 | Wilbur | N进制数加法 | C++ | Wrong Answer | 33 | 1 MS | 240 KB | 433 | 2024-08-20 16:29:09 |
#include <iostream> using namespace std; int main() { int b,n,m; cin>>b>>n>>m; int num=0,num1=0,c=1,ans=0; while (n!=0){ num+=n%10*c; c*=b; n/=10; } c=1; while (m!=0){ num1+=m%10*c; c*=b; m/=10; } num+=num1; while (num!=0){ ans*=10; ans+=num%b; num/=b; } cout<<ans<<endl; return 0; }