結果
問題 |
No.2030 Googol Strings
|
ユーザー |
![]() |
提出日時 | 2022-08-05 22:13:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 645 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 14,420 KB |
最終ジャッジ日時 | 2024-09-15 19:11:33 |
合計ジャッジ時間 | 4,267 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 12 WA * 4 |
ソースコード
import sys def main(): t = int(input()) Q = sys.stdin.read().split() for qi in range(t): X = Q[2*qi] Y = Q[2*qi+1] nx, ny = len(X), len(Y) ok = False for i in range(max(nx, ny)): xi = i if i < nx else i % nx yi = i if i < ny else i % ny if X[xi] > Y[yi]: print('X') ok = True elif X[xi] < Y[yi]: print('Y') ok = True else: continue break if not ok: print('X' if nx > ny else 'Y') if __name__ == '__main__': main()