Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
108085 | 刘泽熙 | 十进制转二进制 | C++ | Compile Error | 0 MS | 0 KB | 220 | 2025-01-19 14:24:06 |
#include<bits/stdc++.h> using namespace std; int y[32]; int cnt =0; int main(){ long long n; cin>>n; while(1){ int yu=n%2; y[cnt]=yu; cnt++; n=n/2; } for(int i=cnt-1;i--){ cout<<y[i]; } }
Main.cc: In function 'int main()': Main.cc:14:21: error: expected ';' before ')' token for(int i=cnt-1;i--){ ^