結果
| 問題 |
No.1737 One to N
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-12 21:28:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 2,000 ms |
| コード長 | 251 bytes |
| コンパイル時間 | 523 ms |
| コンパイル使用メモリ | 82,380 KB |
| 実行使用メモリ | 63,104 KB |
| 最終ジャッジ日時 | 2024-11-25 12:07:18 |
| 合計ジャッジ時間 | 3,303 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
x = int(input())
floor = [-1 for i in range(x+1)]
for i in range(2,x+1):
if floor[i] != -1:
continue
j = i
while j <= x:
if floor[j] == -1:
floor[j] = i
j += i
ans = 0
while x != 1:
ans += floor[x]
x //= floor[x]
print(ans)