| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 67821 | 张俊杰 | 十进制转二进制 | C++ | Runtime Error | 1 MS | 264 KB | 272 | 2024-03-17 14:52:26 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,l=0; int a[20]; cin>>n; for(int i=1;i<=n;i++){ a[l++]=n%2; n=n/2; } a[l++]=n%2; for(int i=l-1;i>=0;i--){ cout<<a[i]; } return 0; }
*** stack smashing detected ***: ./Main terminated