結果
| 問題 |
No.648 お や す み
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-03-08 01:41:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| コード長 | 219 bytes |
| コンパイル時間 | 325 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2024-10-09 11:43:43 |
| 合計ジャッジ時間 | 5,925 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 84 |
ソースコード
n = int(input())
ok = 0
ng = 2*10**9
while ng-ok > 1:
mid = (ng+ok)//2
if mid*(mid+1)//2 <= n:
ok = mid
else:
ng = mid
if ok*(ok+1)//2==n:
print("YES")
print(ok)
else:
print("NO")
convexineq