結果

問題 No.2030 Googol Strings
ユーザー titiatitia
提出日時 2022-08-05 23:28:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,784 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 10,776 KB
実行使用メモリ 10,944 KB
最終ジャッジ日時 2023-10-14 01:27:29
合計ジャッジ時間 13,353 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
8,128 KB
testcase_01 AC 17 ms
8,180 KB
testcase_02 AC 17 ms
8,540 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 AC 234 ms
8,200 KB
testcase_05 AC 240 ms
7,796 KB
testcase_06 AC 449 ms
10,564 KB
testcase_07 AC 900 ms
10,920 KB
testcase_08 AC 913 ms
10,944 KB
testcase_09 AC 1,245 ms
7,892 KB
testcase_10 AC 1,199 ms
8,284 KB
testcase_11 AC 1,201 ms
8,120 KB
testcase_12 AC 1,027 ms
8,356 KB
testcase_13 AC 1,279 ms
8,260 KB
testcase_14 AC 460 ms
8,000 KB
testcase_15 AC 1,784 ms
8,336 KB
testcase_16 AC 897 ms
8,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T=int(input())
for tests in range(T):
    x=input().strip()
    y=input().strip()

    for i in range(max(len(x)*2,len(y)*2)):
        if x[i%len(x)]>y[i%len(y)]:
            print("X")
            break
        elif x[i%len(x)]<y[i%len(y)]:
            print("Y")
            break

    else:
        if len(x)>len(y):
            print("X")
        else:
            print("Y")
0