#16621: 奇怪的解法


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)

學校 : 臺北市私立延平高級中學
編號 : 83268
來源 : [203.72.178.1]
最後登入時間 :
2023-10-30 13:02:50
a038. 數字翻轉 | From: [114.42.214.102] | 發表日期 : 2019-01-22 18:51

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv){
string a;
int b;
while(cin>>a){
reverse(a.begin(),a.end());<------翻轉字串
istringstream is(a);<------轉字串為數字
is>>b;
cout<<b;
}
}
 
ZeroJudge Forum