/ CYOJ /

记录详情

Accepted


  
Found 5 testcases.
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 3ms 256.0 KiB
#2 Accepted 3ms 256.0 KiB
#3 Accepted 3ms 256.0 KiB
#4 Accepted 3ms 256.0 KiB
#5 Accepted 4ms 256.0 KiB

代码

#include<iostream>
using namespace std;
long long a,i = 1;
int main() {
    cin>>a;
    if(!a){
        cout<<a;
        return 0;
    }
    int b[10000];
    while(a){
        b[i] = a % 2;
        a /= 2;
        i++;
    }
    i--;
    for(long long j = i;j >= 1;j--){
        cout<<b[j];
    }
}

信息

递交者
类型
递交
题目
P1004 (主团2022年7-8月)进制转化
语言
C++
递交时间
2022-08-28 08:44:18
评测时间
2022-08-28 08:44:18
评测机
分数
100
总耗时
17ms
峰值内存
256.0 KiB