#include<iostream> using namespace std; int main(){ unsigned long long int a; while(cin>>a){ unsigned long long int b; while(a%10==0){ a/=10; } do{ b=a%10; cout<<b; a/=10; }while(a!=0); cout<<endl; } }
#include using namespace std; int main(){ unsigned long long int a; while(cin>>a){ unsigned long long int b; while(a%10==0){ a/=10; } do{ b=a%10; cout<<b; a/=10; }while(a!=0); cout<<endl; } }
輸入是0會錯喔