Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
108428 | 冯俊淞 | 二进制数问题 | C++ | Wrong Answer | 1 MS | 268 KB | 291 | 2025-01-20 13:19:39 |
#include<bits/stdc++.h> using namespace std; int y[32]; int cnt = 0; int main() { int n; cin >> n; while (1) { int yu = n % 2; y[cnt] = yu; cnt++; n = n / 2; if (n == 0) { break; } } for (int i = cnt - 1; i >= 0; i--) { cout << y[i]; } return 0; }
------Input------
0
------Answer-----
538 462
------Your output-----
0