結果

問題 No.2030 Googol Strings
ユーザー 👑 KazunKazun
提出日時 2022-08-05 21:58:59
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 86,872 KB
実行使用メモリ 84,240 KB
最終ジャッジ日時 2023-10-13 22:46:38
合計ジャッジ時間 2,937 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
76,536 KB
testcase_01 AC 75 ms
71,180 KB
testcase_02 AC 75 ms
73,152 KB
testcase_03 AC 70 ms
71,124 KB
testcase_04 AC 87 ms
76,708 KB
testcase_05 AC 75 ms
71,056 KB
testcase_06 AC 84 ms
80,892 KB
testcase_07 AC 87 ms
84,240 KB
testcase_08 AC 88 ms
84,192 KB
testcase_09 AC 77 ms
71,168 KB
testcase_10 AC 75 ms
71,212 KB
testcase_11 AC 75 ms
71,052 KB
testcase_12 AC 86 ms
76,804 KB
testcase_13 AC 90 ms
76,664 KB
testcase_14 AC 78 ms
71,096 KB
testcase_15 AC 82 ms
71,208 KB
testcase_16 AC 85 ms
79,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input=sys.stdin.readline
write=sys.stdout.write

T=int(input())

Ans=[""]*T
for t in range(T):
    x=input()[:-1]
    y=input()[:-1]

    if x+y==y+x:
        Ans[t]="X" if len(x)>len(y) else "Y"
    elif x+y>y+x:
        Ans[t]="X"
    else:
        Ans[t]="Y"

write("\n".join(Ans))
0