結果
問題 |
No.2030 Googol Strings
|
ユーザー |
![]() |
提出日時 | 2022-08-05 22:12:15 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 409 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 222,652 KB |
最終ジャッジ日時 | 2024-09-15 19:10:35 |
合計ジャッジ時間 | 4,053 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 12 WA * 4 |
ソースコード
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")