1 条题解

  • 1
    @ 2026-1-2 21:27:43
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        unsigned long long n;
        cin>>n;
        bool a=0;
        while(a==0){
            if (n/2==0 && n%2==0){
                break;
            }
            cout<<n/2;
            cout<<" "<<n%2<<endl;
            n=n/2;
            
        }
        return 0;
    }
    //#include<bits/stdc++.h>
    //using namespace std;
    //int main(){
    //    unsigned long long n;
    //    cin>>n;
    //    bool a=0;
    //    while(n>0){
    //        cout<<n/2;
    //        cout<<" "<<n%2<<endl;
    //        n=n/2;
    //        
    //    }
    //    return 0;
    //}
    
    • 1

    信息

    ID
    10141
    时间
    1000ms
    内存
    512MiB
    难度
    1
    标签
    递交数
    0
    已通过
    0
    上传者