結果

問題 No.648  お や す み 
ユーザー lam6er
提出日時 2025-03-20 18:41:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 164 bytes
コンパイル時間 206 ms
コンパイル使用メモリ 82,436 KB
実行使用メモリ 53,948 KB
最終ジャッジ日時 2025-03-20 18:42:01
合計ジャッジ時間 5,265 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 84
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n = int(input())
D = 1 + 8 * n
s = math.isqrt(D)
if s * s == D and s % 2 == 1:
    k = (s - 1) // 2
    print("YES")
    print(k)
else:
    print("NO")
0