結果
問題 |
No.1256 連続整数列
|
ユーザー |
![]() |
提出日時 | 2024-08-02 08:55:32 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 291 bytes |
コンパイル時間 | 294 ms |
コンパイル使用メモリ | 82,908 KB |
実行使用メモリ | 53,772 KB |
最終ジャッジ日時 | 2024-08-02 08:55:35 |
合計ジャッジ時間 | 2,731 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 14 |
ソースコード
def BinarySearch(yes, no, A): while abs(yes - no) != 1: mid = (yes + no)//2 if A >= 3 * mid + 3: yes = mid else: no = mid return 3 * yes + 3 A = int(input()) B = BinarySearch(-2, 10 ** 9 + 5, A) print("YES") if A == B else print("NO")