結果

問題 No.2030 Googol Strings
ユーザー lloyzlloyz
提出日時 2023-08-26 18:38:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 232 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 759 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 218,932 KB
最終ジャッジ日時 2023-08-26 18:38:58
合計ジャッジ時間 4,897 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 163 ms
78,176 KB
testcase_01 AC 84 ms
75,224 KB
testcase_02 AC 110 ms
102,540 KB
testcase_03 AC 67 ms
71,544 KB
testcase_04 AC 166 ms
78,064 KB
testcase_05 AC 88 ms
73,816 KB
testcase_06 AC 188 ms
182,332 KB
testcase_07 AC 228 ms
218,932 KB
testcase_08 AC 217 ms
218,744 KB
testcase_09 AC 133 ms
80,276 KB
testcase_10 AC 135 ms
79,636 KB
testcase_11 AC 133 ms
78,376 KB
testcase_12 AC 215 ms
78,160 KB
testcase_13 AC 189 ms
80,020 KB
testcase_14 AC 105 ms
76,528 KB
testcase_15 AC 210 ms
120,268 KB
testcase_16 AC 232 ms
177,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

for _ in range(int(input())):
    S = list(input().rstrip())
    T = list(input().rstrip())
    n, m = len(S), len(T)
    ST = S + T
    TS = T + S
    if ST > TS:
        print('X')
    elif ST < TS:
        print('Y')
    else:
        if n > m:
            print('X')
        else:
            print('Y')
0