結果
| 問題 |
No.2466 Root! Root! Root!
|
| ユーザー |
|
| 提出日時 | 2024-02-03 08:35:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 198 bytes |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2024-09-28 10:45:21 |
| 合計ジャッジ時間 | 1,821 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 24 |
ソースコード
import math
def calculate_result(N):
result = int(math.sqrt(1 + N * (N + 1)))
if N != 0:
result += 1
return result
N = int(input())
result = calculate_result(N)
print(result)