結果
| 問題 | No.648 お や す み |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-01-19 21:04:26 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 24 ms / 2,000 ms |
| + 266µs | |
| コード長 | 159 bytes |
| 記録 | |
| コンパイル時間 | 62 ms |
| コンパイル使用メモリ | 83,044 KB |
| 実行使用メモリ | 56,360 KB |
| 最終ジャッジ日時 | 2026-09-28 15:45:39 |
| 合計ジャッジ時間 | 4,977 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")