結果

問題 No.648  お や す み 
ユーザー ktr_0129
提出日時 2018-02-22 15:40:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 164 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 17,700 KB
最終ジャッジ日時 2024-10-01 13:06:47
合計ジャッジ時間 4,868 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 20 TLE * 1 -- * 63
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n=int(input())
i=int((math.sqrt(8*n+1)-1)/2)
N=i-1
while N<n:
     
    if n==N:
        print('YES\n%d'%i)
    elif N>n:
        print('NO')
    N+=1
0