結果

問題 No.2030 Googol Strings
ユーザー 👑 rin204rin204
提出日時 2022-08-20 15:31:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 172 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 88,448 KB
最終ジャッジ日時 2024-04-17 14:12:16
合計ジャッジ時間 3,328 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 168 ms
77,568 KB
testcase_01 AC 59 ms
68,224 KB
testcase_02 AC 53 ms
64,256 KB
testcase_03 AC 42 ms
51,840 KB
testcase_04 AC 172 ms
77,184 KB
testcase_05 AC 56 ms
64,640 KB
testcase_06 AC 59 ms
70,656 KB
testcase_07 AC 62 ms
73,728 KB
testcase_08 AC 63 ms
73,856 KB
testcase_09 AC 62 ms
68,864 KB
testcase_10 AC 66 ms
70,656 KB
testcase_11 AC 63 ms
68,736 KB
testcase_12 AC 163 ms
77,312 KB
testcase_13 AC 128 ms
76,672 KB
testcase_14 AC 60 ms
68,992 KB
testcase_15 AC 79 ms
88,448 KB
testcase_16 AC 68 ms
79,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    S = input()
    T = input()
    ls = len(S)
    lt = len(T)
    ll = max(ls, lt) * 5
    S *= ((ll + ls - 1) // ls)
    T *= ((ll + lt - 1) // lt)
    S = S[:ll]
    T = T[:ll]
    if S > T:
        print("X")
    elif S < T:
        print("Y")
    elif ls < lt:
        print("Y")
    else:
        print("X")

for _ in range(int(input())):
    solve()
0