結果

問題 No.648  お や す み 
ユーザー firecat_5053
提出日時 2018-05-11 21:08:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 202 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-06-28 04:00:57
合計ジャッジ時間 4,868 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 79 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n = float(input())
from decimal import *
getcontext().prec = 28
t = Decimal(4 * n) / Decimal(1 + math.sqrt(1 + 8 * n))
if t % 1 == 0:
    print("YES")
    print(int(t))
else:
    print("NO")
0