結果

問題 No.2030 Googol Strings
ユーザー ntudantuda
提出日時 2022-08-09 21:31:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 519 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 81,664 KB
実行使用メモリ 76,816 KB
最終ジャッジ日時 2023-10-20 06:18:34
合計ジャッジ時間 3,900 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
76,816 KB
testcase_01 AC 44 ms
61,584 KB
testcase_02 AC 41 ms
59,076 KB
testcase_03 AC 37 ms
53,392 KB
testcase_04 AC 143 ms
76,552 KB
testcase_05 AC 45 ms
61,584 KB
testcase_06 AC 51 ms
68,296 KB
testcase_07 AC 49 ms
64,968 KB
testcase_08 AC 48 ms
64,968 KB
testcase_09 AC 46 ms
63,632 KB
testcase_10 AC 47 ms
63,632 KB
testcase_11 AC 47 ms
63,632 KB
testcase_12 AC 131 ms
76,144 KB
testcase_13 WA -
testcase_14 AC 45 ms
63,632 KB
testcase_15 AC 52 ms
71,992 KB
testcase_16 AC 52 ms
71,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

for _ in range(N):
    x = input()
    y = input()
    if x < y:
        if len(x) >= len(y):
            print("Y")
        else:
            k = (len(y)//len(x)+1)*2
            if (x*k)[:len(y)*2] <= y*2:
                print("Y")
            else:
                print("X")
    else:
        if len(x) <= len(y):
            print("X")
        else:
            k = len(x)//len(y)+1
            if (y*k)[:len(x)*2] <= x*2:
                print("X")
            else:
                print("Y")
0