結果

問題 No.2030 Googol Strings
ユーザー 👑 H20H20
提出日時 2022-08-05 22:00:18
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 148 ms / 2,000 ms
コード長 492 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 82,920 KB
最終ジャッジ日時 2023-10-13 22:48:46
合計ジャッジ時間 2,997 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
80,948 KB
testcase_01 AC 73 ms
71,268 KB
testcase_02 AC 72 ms
75,360 KB
testcase_03 AC 68 ms
71,376 KB
testcase_04 AC 146 ms
80,820 KB
testcase_05 AC 74 ms
71,376 KB
testcase_06 AC 78 ms
79,972 KB
testcase_07 AC 83 ms
82,920 KB
testcase_08 AC 84 ms
82,744 KB
testcase_09 AC 76 ms
71,320 KB
testcase_10 AC 77 ms
71,520 KB
testcase_11 AC 75 ms
71,212 KB
testcase_12 AC 148 ms
80,956 KB
testcase_13 AC 121 ms
79,476 KB
testcase_14 AC 75 ms
71,116 KB
testcase_15 AC 79 ms
76,244 KB
testcase_16 AC 82 ms
81,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
X = []
Y = []
for _ in range(T):
    X.append(input())
    Y.append(input())
for i in range(T):
    x = X[i]*2
    y = Y[i]*2
    lenx = len(x)
    leny = len(y)
    if lenx>leny:
        v = -(-lenx//leny)
        y = y*v
        y = y[:len(x)]
        if x>=y:
            print('X')
        else:
            print('Y')
    else:
        v = -(-leny//lenx)
        x = x*v
        x = x[:len(y)]
        if y>=x:
            print('Y')
        else:
            print('X')
0