結果
| 問題 | No.2030 Googol Strings |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-05 22:20:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 326 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 76,800 KB |
| 最終ジャッジ日時 | 2024-09-15 19:26:25 |
| 合計ジャッジ時間 | 2,498 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 12 WA * 4 |
ソースコード
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')