結果

問題 No.2030 Googol Strings
ユーザー 👑 H20H20
提出日時 2022-08-05 22:01:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 488 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 81,416 KB
最終ジャッジ日時 2023-10-13 22:50:47
合計ジャッジ時間 2,894 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
81,416 KB
testcase_01 AC 71 ms
71,392 KB
testcase_02 AC 68 ms
72,256 KB
testcase_03 AC 64 ms
71,248 KB
testcase_04 WA -
testcase_05 AC 68 ms
71,140 KB
testcase_06 AC 72 ms
76,228 KB
testcase_07 AC 75 ms
77,636 KB
testcase_08 AC 77 ms
77,988 KB
testcase_09 AC 70 ms
71,472 KB
testcase_10 AC 71 ms
71,252 KB
testcase_11 AC 71 ms
71,544 KB
testcase_12 AC 132 ms
81,132 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 72 ms
73,352 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]
    y = Y[i]
    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