結果

問題 No.2030 Googol Strings
ユーザー H20
提出日時 2022-08-05 22:01:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 488 bytes
コンパイル時間 760 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 78,152 KB
最終ジャッジ日時 2024-09-15 18:35:32
合計ジャッジ時間 2,239 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 12 WA * 4
権限があれば一括ダウンロードができます

ソースコード

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