結果
問題 |
No.2521 Don't be Same
|
ユーザー |
|
提出日時 | 2023-10-27 21:42:44 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 704 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 82,796 KB |
実行使用メモリ | 83,976 KB |
平均クエリ数 | 2.61 |
最終ジャッジ日時 | 2024-09-25 13:48:13 |
合計ジャッジ時間 | 5,655 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 10 WA * 1 RE * 16 |
ソースコード
X,Y=map(int,input().split()) if abs(X-Y)==1: print("Second",flush=True) t,*s=input().split() if s[0]=="1": X-=int(s[1]) else: Y-=int(s[1]) else: print("First",flush=True) while True: if X==Y: print("B",flush=True) break if X==0: print("A",2,Y,flush=True) break if Y==0: print("A",1,X,flush=True) break if X%2==0: print("A",2,Y-(X-1),flush=True) elif Y%2==0: print("A",1,X-(Y-1),flush=True) elif X<Y: print("A",2,Y-X-1,flush=True) else: print("A",1,X-Y-1,flush=True) t,*s=input().split() if s[0]=="1": X-=int(s[1]) else: Y-=int(s[1])