結果

問題 No.2030 Googol Strings
ユーザー ニックネームニックネーム
提出日時 2022-08-05 22:07:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,232 ms / 2,000 ms
コード長 249 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 10,464 KB
実行使用メモリ 10,936 KB
最終ジャッジ日時 2023-10-13 23:10:51
合計ジャッジ時間 9,556 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
7,684 KB
testcase_01 AC 16 ms
7,776 KB
testcase_02 AC 15 ms
8,660 KB
testcase_03 AC 15 ms
7,752 KB
testcase_04 AC 206 ms
7,772 KB
testcase_05 AC 160 ms
7,812 KB
testcase_06 AC 282 ms
10,496 KB
testcase_07 AC 546 ms
10,932 KB
testcase_08 AC 580 ms
10,936 KB
testcase_09 AC 782 ms
7,808 KB
testcase_10 AC 769 ms
7,920 KB
testcase_11 AC 780 ms
7,688 KB
testcase_12 AC 817 ms
7,768 KB
testcase_13 AC 797 ms
7,816 KB
testcase_14 AC 311 ms
7,748 KB
testcase_15 AC 1,232 ms
8,340 KB
testcase_16 AC 551 ms
8,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    x = input(); y = input()
    m = len(x); n = len(y)
    for i in range(2*max(m, n)):
        if x[i%m] > y[i%n]: print("X"); break
        if x[i%m] < y[i%n]: print("Y"); break
    else: print("X" if m > n else "Y")
0