結果

問題 No.648  お や す み 
ユーザー YamaKasa
提出日時 2018-09-30 20:22:24
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-10-12 09:17:25
合計ジャッジ時間 4,575 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 80 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n = int(input())
a = math.sqrt(1 + 8 * n)

if(a.is_integer()):
    x = (-1 + a) / 2
    if(x.is_integer()):
        print("YES")
        print(round(x))
    else:
        print("NO")
else:
    print("NO")
0