結果
| 問題 | No.648 お や す み |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-19 21:04:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 159 bytes |
| 記録 | |
| コンパイル時間 | 419 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2026-05-17 07:09:01 |
| 合計ジャッジ時間 | 5,494 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 84 |
ソースコード
n = int(input())
x = int((2 * n) ** 0.5)
while x * (x + 1) // 2 < n:
x += 1
if x * (x + 1) // 2 == n:
print("YES")
print(x)
else:
print("NO")