Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
141631 ‎ 十进制转d进制 C++ Wrong Answer 70 0 MS 252 KB 393 2024-04-06 09:14:14

Tests(7/10):


#include <bits/stdc++.h> using namespace std; char a[37]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; stack <char>n; int main(){ int k,d; cin>>k>>d; while(k){ n.push(a[k%d]); k/=d; } if(!n.size()) { cout<<'0'<<endl;return 0; } while(n.size()) cout<<n.top(),n.pop(); }


Judgement Protocol: