1 条题解

  • 0
    @ 2024-12-24 9:14:32

    C++ :

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

    Python :

    # coding=utf-8
    n=input()
    s=len(n)
    m=int(n)
    while(s>0):
        print(m%10,end=' ')
        m//=10
        s-=1
    
    
    • 1

    信息

    ID
    556
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者