結果
問題 |
No.648 お や す み
|
ユーザー |
👑 ![]() |
提出日時 | 2020-06-10 15:05:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 230 bytes |
コンパイル時間 | 266 ms |
コンパイル使用メモリ | 82,428 KB |
実行使用メモリ | 53,220 KB |
最終ジャッジ日時 | 2024-06-23 05:45:34 |
合計ジャッジ時間 | 5,134 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 83 WA * 1 |
ソースコード
from math import sqrt import sys def f(n): return (n*(n+1))//2 N=int(input()) d=int((sqrt(8*N+1)-1)/2) for h in range(d-3,d+4): if f(h)==N: print("YES") print(h) sys.exit() print("NO")