結果

問題 No.2030 Googol Strings
ユーザー 👑 H20H20
提出日時 2022-08-05 22:05:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 166 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 732 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 82,544 KB
最終ジャッジ日時 2023-10-13 23:04:56
合計ジャッジ時間 3,383 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 162 ms
77,944 KB
testcase_01 AC 73 ms
71,012 KB
testcase_02 AC 74 ms
74,912 KB
testcase_03 AC 67 ms
71,128 KB
testcase_04 AC 166 ms
78,660 KB
testcase_05 AC 73 ms
71,316 KB
testcase_06 AC 78 ms
80,104 KB
testcase_07 AC 80 ms
82,368 KB
testcase_08 AC 80 ms
82,544 KB
testcase_09 AC 73 ms
71,240 KB
testcase_10 AC 71 ms
71,060 KB
testcase_11 AC 73 ms
71,372 KB
testcase_12 AC 158 ms
78,460 KB
testcase_13 AC 131 ms
78,604 KB
testcase_14 AC 75 ms
71,348 KB
testcase_15 AC 81 ms
75,112 KB
testcase_16 AC 78 ms
80,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#嘘解法?
T = int(input())
X = []
Y = []
for _ in range(T):
    x = input()*2
    y = input()*2
    lenx = len(x)
    leny = len(y)
    if lenx>leny:
        ceil = -(-lenx//leny)
        y = y*ceil
        y = y[:len(x)]
        if x>=y:
            print('X')
        else:
            print('Y')
    else:
        ceil = -(-leny//lenx)
        x = x*ceil
        x = x[:len(y)]
        if y>=x:
            print('Y')
        else:
            print('X')
0