結果

問題 No.2030 Googol Strings
コンテスト
ユーザー SidewaysOwl
提出日時 2022-08-05 22:12:15
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 409 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 797 ms
コンパイル使用メモリ 85,376 KB
実行使用メモリ 207,704 KB
最終ジャッジ日時 2026-04-04 21:58:50
合計ジャッジ時間 7,595 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 12 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

for _ in range(int(input())):
    x = list(input())
    y = list(input())
    xx = x + x
    yy = y + y
    n = min(len(x),len(y))*2
    cnt = 0
    for i in range(n):
        cnt += xx[i] == yy[i]
    if cnt != n:
        if xx > yy:
            print("X")
        elif xx < yy:
            print("Y")
    else:
        if len(x) > len(y):
            print("X")
        else:
            print("Y")
        
0