4 条题解

  • 1
    @ 2026-7-20 15:48:07
    # include <bits/stdc++.h>
    
    using namespace std;
    unsigned long long n;
    int main(){
    	cin>>n;
    	while(n){
    		cout<<n%10<<" ";
    		n/=10;
    	}
    	return 0;
    }
    
    • 1
      @ 2026-6-28 11:05:08

      这题很简单,while循环保证AC:

      #include <iostream>
      using namespace std;
      int main(){
      	int n,shuwei;
      	cin >> n;
      	while(n){
      		shuwei = n % 10;
      		n /= 10;
      		cout << shuwei << " ";
      	}
      	return 0;
      }
      
      • 0
        @ 2026-3-18 17:07:42

        #include<bits/stdc++.h> using namespace std; int main(){ int m; cin>>m; while(m!=0){ cout<<m%10<<" "; m=m/10; } return 0; }

        • 0
          @ 2026-3-18 17:07:06

          #include<bits/stdc++.h> using namespace std ; int main ( ) { int m ; cin >> m ; while ( m != 0 ) { cout << m % 10 << " " ; m = m / 10 ; } return 0 ; }

          • 1

          信息

          ID
          3492
          时间
          1000ms
          内存
          256MiB
          难度
          5
          标签
          递交数
          46
          已通过
          20
          上传者