Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140064 李明秦 十进制转二进制 C++ Accepted 1 MS 272 KB 230 2025-12-13 15:08:28

Tests(20/20):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int x,a[64]={}; cin>>x; if(x==0)cout<<0; int i=0; while(x!=0){ a[i]=x%2; x/=2; i++; } for(int j=i-1;j>=0;j--){ cout<<a[j]; } return 0; }