結果

問題 No.2030 Googol Strings
ユーザー 👑 Kazun
提出日時 2022-08-05 21:58:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 75,556 KB
最終ジャッジ日時 2024-09-15 18:31:37
合計ジャッジ時間 2,040 ms
ジャッジサーバーID
(参考情報)
judge6 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

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