#33323: 不動腦解C++


yp11151097@yphs.tp.edu.tw (708-30施耀登)

School : 臺北市私立延平高級中學
ID : 197083
IP address : [203.72.178.1]
Last Login :
2023-06-07 17:36:00
d570. 神龍見首不見尾 -- 板橋高中教學題 | From: [223.136.88.108] | Post Date : 2022-12-24 16:22

#include<bits/stdc++.h>
using namespace std;
main(){
int a;
while(cin>>a){
    cout<<a<<endl;
    while(a/10>=10){
        a/=10;
        cout<<a<<endl;
    }
    if(a>=10) cout<<a/10<<endl;
}
}

 
ZeroJudge Forum