結果

問題 No.2030 Googol Strings
ユーザー roarisroaris
提出日時 2022-08-05 22:20:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 87,148 KB
実行使用メモリ 78,744 KB
最終ジャッジ日時 2023-10-13 23:34:03
合計ジャッジ時間 3,048 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
77,696 KB
testcase_01 AC 77 ms
71,088 KB
testcase_02 AC 73 ms
71,708 KB
testcase_03 AC 72 ms
71,084 KB
testcase_04 WA -
testcase_05 AC 78 ms
71,068 KB
testcase_06 AC 83 ms
77,048 KB
testcase_07 AC 85 ms
78,680 KB
testcase_08 AC 86 ms
78,744 KB
testcase_09 AC 77 ms
71,084 KB
testcase_10 AC 78 ms
71,404 KB
testcase_11 AC 78 ms
71,028 KB
testcase_12 AC 120 ms
77,316 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 81 ms
71,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

for _ in range(int(input())):
    x = input()[:-1]
    y = input()[:-1]
    
    if len(x)<len(y):
        s, a = divmod(len(y), len(x))
        x2, y2 = ''.join([x*s, x[:a]]), y
    else:
        s, a = divmod(len(x), len(y))
        x2, y2 = x, ''.join([y*s, y[:a]])
    
    if x2==y2:
        if x<y:
            print('Y')
        else:
            print('X')
    elif x2<y2:
        print('Y')
    else:
        print('X')
0