15 条题解

  • -1
    @ 2023-7-10 10:17:08
    #include <bits/stdc++.h>
    using namespace std;
    int main() {
    int a[1000]={0},t=1,j=1;
    cin>>a[1];
    for(j=1;a[j]>=2;j++)
    {
    a[j+1]=a[j]/2;
    a[j]=a[j]%2;t++;
    }
    for(int i=t;i>=1;i--)
    {
    cout<<a[i];
    }
    return 0;
    }
    
    • @ 2024-7-19 20:16:33

      遇上了一年前的自己😕

信息

ID
84
时间
1000ms
内存
128MiB
难度
6
标签
递交数
1453
已通过
460
上传者