結果

問題 No.648  お や す み 
ユーザー Konton7
提出日時 2019-04-28 09:07:39
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 161 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-14 16:24:09
合計ジャッジ時間 4,705 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 81 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

n = int(input())

a, b = math.floor(math.sqrt(2*n)), math.ceil(math.sqrt(2*n))

if a*b == 2*n:
    print("YES")
    print(a)
else:
    print("NO")

0