結果
| 問題 |
No.2030 Googol Strings
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2022-08-09 21:31:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 519 bytes |
| コンパイル時間 | 167 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 77,568 KB |
| 最終ジャッジ日時 | 2024-09-20 01:56:13 |
| 合計ジャッジ時間 | 2,745 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 WA * 1 |
ソースコード
N = int(input())
for _ in range(N):
x = input()
y = input()
if x < y:
if len(x) >= len(y):
print("Y")
else:
k = (len(y)//len(x)+1)*2
if (x*k)[:len(y)*2] <= y*2:
print("Y")
else:
print("X")
else:
if len(x) <= len(y):
print("X")
else:
k = len(x)//len(y)+1
if (y*k)[:len(x)*2] <= x*2:
print("X")
else:
print("Y")
ntuda