mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-23 20:08:47 +00:00
P1307 [NOIP2011 普及组] 数字反转
R63286206
This commit is contained in:
parent
6100a26801
commit
63b865495c
15
Luogu/P1307/P1307.cpp
Normal file
15
Luogu/P1307/P1307.cpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int n, s;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
cin >> n;
|
||||||
|
while (n) {
|
||||||
|
s = s * 10 + n % 10;
|
||||||
|
n /= 10;
|
||||||
|
}
|
||||||
|
cout << s << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user