結果

問題 No.2030 Googol Strings
ユーザー ntudantuda
提出日時 2022-08-09 21:49:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 523 bytes
コンパイル時間 643 ms
コンパイル使用メモリ 81,604 KB
実行使用メモリ 76,752 KB
最終ジャッジ日時 2023-10-20 06:49:42
合計ジャッジ時間 2,704 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
76,752 KB
testcase_01 AC 41 ms
61,560 KB
testcase_02 AC 43 ms
60,600 KB
testcase_03 AC 34 ms
53,368 KB
testcase_04 AC 139 ms
76,488 KB
testcase_05 AC 42 ms
61,560 KB
testcase_06 AC 54 ms
68,272 KB
testcase_07 AC 46 ms
64,944 KB
testcase_08 AC 51 ms
64,944 KB
testcase_09 AC 46 ms
63,608 KB
testcase_10 AC 48 ms
65,656 KB
testcase_11 AC 45 ms
65,656 KB
testcase_12 AC 130 ms
76,380 KB
testcase_13 AC 107 ms
76,168 KB
testcase_14 AC 45 ms
63,608 KB
testcase_15 AC 53 ms
74,896 KB
testcase_16 AC 50 ms
73,464 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)*2
            if (y*k)[:len(x)*2] <= x*2:
                print("X")
            else:
                print("Y")
0