QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#152989#6834. Nine Is Greater Than Tenqzez#AC ✓1ms4168kbC++141.1kb2023-08-29 07:06:212023-08-29 07:06:22

Judging History

你现在查看的是最新测评结果

  • [2023-08-29 07:06:22]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:4168kb
  • [2023-08-29 07:06:21]
  • 提交

answer

#include<bits/stdc++.h>
#define Gc() getchar() 
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;using LL=__int128;
const int N=3e5+5,M=3e5+5,K=600+5,mod=1e9+7,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(time(0));
int a,b;
void Solve(){
	int i,j;scanf("%d%d",&a,&b);
	string A,B;
	int x=a;while(x) A+='0'+x%10,x/=10;reverse(A.begin(),A.end());
	x=b;while(x) B+='0'+x%10,x/=10;reverse(B.begin(),B.end());
	while(A.size()<B.size()) A+='.';
	while(A.size()>B.size()) B+='.';
	for(int i=0;i<A.size();i++) if(A[i]^B[i]){
		if(A[i]<B[i]) printf("%d<%d\n",a,b);
		else printf("%d>%d\n",a,b);
		return;
	}
	printf("%d=%d\n",a,b);
}
int main(){
	int t;
	// scanf("%d",&t);
	t=1;
	while(t--) Solve();
	cerr<<clock()*1.0/CLOCKS_PER_SEC<<'\n';
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3992kb

input:

9 10

output:

9>10

result:

ok "9>10"

Test #2:

score: 0
Accepted
time: 1ms
memory: 3876kb

input:

114514 1919

output:

114514<1919

result:

ok "114514<1919"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3940kb

input:

9 999

output:

9<999

result:

ok "9<999"

Test #4:

score: 0
Accepted
time: 1ms
memory: 4000kb

input:

99 99

output:

99=99

result:

ok "99=99"

Test #5:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

2022 924

output:

2022<924

result:

ok "2022<924"

Test #6:

score: 0
Accepted
time: 1ms
memory: 4160kb

input:

1 1

output:

1=1

result:

ok "1=1"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3988kb

input:

1 2

output:

1<2

result:

ok "1<2"

Test #8:

score: 0
Accepted
time: 1ms
memory: 3936kb

input:

2 1

output:

2>1

result:

ok "2>1"

Test #9:

score: 0
Accepted
time: 0ms
memory: 4132kb

input:

20220924 20220924

output:

20220924=20220924

result:

ok "20220924=20220924"

Test #10:

score: 0
Accepted
time: 1ms
memory: 4160kb

input:

20220924 999999

output:

20220924<999999

result:

ok "20220924<999999"

Test #11:

score: 0
Accepted
time: 1ms
memory: 3940kb

input:

1 11111111

output:

1<11111111

result:

ok "1<11111111"

Test #12:

score: 0
Accepted
time: 1ms
memory: 3896kb

input:

1231 12311

output:

1231<12311

result:

ok "1231<12311"

Test #13:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

432423 1123124

output:

432423>1123124

result:

ok "432423>1123124"

Test #14:

score: 0
Accepted
time: 1ms
memory: 4168kb

input:

9999 100000

output:

9999>100000

result:

ok "9999>100000"

Test #15:

score: 0
Accepted
time: 1ms
memory: 4000kb

input:

1926 817

output:

1926<817

result:

ok "1926<817"

Test #16:

score: 0
Accepted
time: 1ms
memory: 3928kb

input:

19260817 19491001

output:

19260817<19491001

result:

ok "19260817<19491001"

Test #17:

score: 0
Accepted
time: 1ms
memory: 3936kb

input:

20220924 1

output:

20220924>1

result:

ok "20220924>1"

Test #18:

score: 0
Accepted
time: 1ms
memory: 3876kb

input:

20220924 2

output:

20220924>2

result:

ok "20220924>2"

Test #19:

score: 0
Accepted
time: 1ms
memory: 3936kb

input:

20 2

output:

20>2

result:

ok "20>2"

Test #20:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

20220924 3

output:

20220924<3

result:

ok "20220924<3"

Test #21:

score: 0
Accepted
time: 1ms
memory: 3936kb

input:

1 2022

output:

1<2022

result:

ok "1<2022"

Test #22:

score: 0
Accepted
time: 1ms
memory: 3968kb

input:

2 2022

output:

2<2022

result:

ok "2<2022"

Test #23:

score: 0
Accepted
time: 1ms
memory: 3880kb

input:

3 2022

output:

3>2022

result:

ok "3>2022"

Test #24:

score: 0
Accepted
time: 1ms
memory: 4004kb

input:

12345678 90

output:

12345678<90

result:

ok "12345678<90"