結果
| 問題 | No.2030 Googol Strings |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2022-08-05 22:00:18 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 91 ms / 2,000 ms |
| + 925µs | |
| コード長 | 492 bytes |
| 記録 | |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 63,756 KB |
| 実行使用メモリ | 68,208 KB |
| 最終ジャッジ日時 | 2026-11-10 23:34:18 |
| 合計ジャッジ時間 | 3,914 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 20 |
ソースコード
T = int(input())
X = []
Y = []
for _ in range(T):
X.append(input())
Y.append(input())
for i in range(T):
x = X[i]*2
y = Y[i]*2
lenx = len(x)
leny = len(y)
if lenx>leny:
v = -(-lenx//leny)
y = y*v
y = y[:len(x)]
if x>=y:
print('X')
else:
print('Y')
else:
v = -(-leny//lenx)
x = x*v
x = x[:len(y)]
if y>=x:
print('Y')
else:
print('X')
H20