mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-08 02:13:51 +08:00
Update: Rename folder name to XSMOJ
This commit is contained in:
26
XSMOJ/数字翻转.cpp
Normal file
26
XSMOJ/数字翻转.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
int main(){
|
||||
int a,b,c=0,d=0;
|
||||
scanf("%d%d",&a,&b);
|
||||
while(a){
|
||||
c=c*10+a%10;
|
||||
a/=10;
|
||||
}
|
||||
while(b){
|
||||
d=d*10+b%10;
|
||||
b/=10;
|
||||
}
|
||||
if(c>d){
|
||||
printf("%d",c);
|
||||
}
|
||||
if(d>c){
|
||||
printf("%d",d);
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user