結果
問題 |
No.2030 Googol Strings
|
ユーザー |
![]() |
提出日時 | 2022-08-09 21:49:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 142 ms / 2,000 ms |
コード長 | 523 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 82,712 KB |
実行使用メモリ | 77,156 KB |
最終ジャッジ日時 | 2024-09-20 02:21:50 |
合計ジャッジ時間 | 2,306 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 16 |
ソースコード
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)*2 if (y*k)[:len(x)*2] <= x*2: print("X") else: print("Y")