結果
| 問題 |
No.2030 Googol Strings
|
| コンテスト | |
| ユーザー |
lilictaka
|
| 提出日時 | 2022-08-10 13:10:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 523 bytes |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 167,440 KB |
| 最終ジャッジ日時 | 2024-09-20 21:14:08 |
| 合計ジャッジ時間 | 4,007 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 WA * 8 |
ソースコード
T = int(input())
def cmp(A,B):
for i in range(min(len(A),len(B))):
if A[i] < B[i]:
return True
return False
for _ in range(T):
X = list(input())
Y = list(input())
if len(X) == len(Y):
if X > Y:
print('X')
else:
print('Y')
elif len(X) > len(Y):
nY = Y + Y
if cmp(X,nY):
print('Y')
else:
print('X')
else:
if cmp(Y,X + X):
print('X')
else:
print('Y')
lilictaka