Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
17094 | hu | 01字串(暴力枚举) | C++ | No Test Data | 0 MS | 0 KB | 335 | 2023-05-11 21:49:22 |
#include<bits/stdc++.h> using namespace std; void shi_to_er(int x) { int num[10]; int cnt = 0; for (int i = 0; i < 5; i++) { num[cnt++] = x % 2; x /= 2; } for (int i = 4; i >= 0; i--) { cout << num[i]; } cout << endl; } int main() { for (int i = 0; i <= 31; i++) { shi_to_er(i); } return 0; }