Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
961 | 邓小龙 | 十进制转二进制 | C++ | Wrong Answer | 0 MS | 268 KB | 324 | 2023-06-10 15:02:18 |
# include<iostream> using namespace std; int n; string s; int main(){ int x; char c; cin>>n; while(n!=0){ x=n%10; c=x+'0';//将数字x转化成对应数字字符 s=c+s; n=n/10; } if(s=="") cout<<'0'; else cout<<s; return 0; }
------Input------
779363653
------Answer-----
101110011101000010010101000101
------Your output-----
779363653