結果

問題 No.2030 Googol Strings
ユーザー ShirotsumeShirotsume
提出日時 2022-07-15 16:59:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 985 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 80,828 KB
最終ジャッジ日時 2023-09-09 19:16:22
合計ジャッジ時間 3,404 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
77,644 KB
testcase_01 AC 74 ms
71,392 KB
testcase_02 AC 74 ms
71,560 KB
testcase_03 AC 70 ms
71,416 KB
testcase_04 WA -
testcase_05 AC 86 ms
75,728 KB
testcase_06 AC 94 ms
79,508 KB
testcase_07 AC 107 ms
80,740 KB
testcase_08 AC 105 ms
80,828 KB
testcase_09 AC 96 ms
75,892 KB
testcase_10 AC 98 ms
75,972 KB
testcase_11 AC 97 ms
75,844 KB
testcase_12 AC 127 ms
77,652 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 106 ms
77,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
INF = 2 ** 63 - 1
mod = 998244353

def solve():
    x = input()
    y = input()

    for i in range(min(len(x), len(y))):
        if x[i] > y[i]:
            print('X')
            return
        elif x[i] < y[i]:
            print('Y')
            return
    if len(x) > len(y):
        z = x[len(y):]
        for i in range(min(len(z), len(y))):
            if y[i] > z[i]:
                print('Y')
                return
            elif y[i] < z[i]:
                print('X')
                return
        print('X')
    elif len(x) <= len(y):
        z = y[len(x):]
        for i in range(min(len(z), len(x))):
            if x[i] > z[i]:
                print('X')
                return
            elif x[i] < z[i]:
                print('Y')
                return
        print('Y')
        
for _ in range(ii()):
    solve()
0