結果

問題 No.648  お や す み 
ユーザー pluto77
提出日時 2018-02-19 16:56:36
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 130 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 21:10:16
合計ジャッジ時間 3,069 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 84
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki648
import math

n=int(raw_input())
m=(int(math.sqrt(1+8*n))-1)/2
if n==(m*(m+1)/2):
 print 'YES'
 print m
else:
 print 'NO'
0