2 条题解

  • 1
    @ 2026-4-17 17:14:05

    jhesf

    • 1
      @ 2024-12-22 11:03:58

      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
      143
      时间
      1000ms
      内存
      128MiB
      难度
      1
      标签
      (无)
      递交数
      15
      已通过
      39
      上传者