#include<bits/stdc++.h> using namespace std; int main(){ int n,s=0; cin>>n; while(n>=10){ int w=n; while(w!=0){ s+=w%10; w/=10; } n=s; s=0; } cout<<n; return 0; }
曹莫凡
使用您的 Turing 通用账户