結果
| 問題 | No.3505 Sum of Prod of Root |
| コンテスト | |
| ユーザー |
YuukunA
|
| 提出日時 | 2026-04-19 00:16:15 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 332 bytes |
| 記録 | |
| コンパイル時間 | 327 ms |
| コンパイル使用メモリ | 20,704 KB |
| 実行使用メモリ | 31,528 KB |
| 最終ジャッジ日時 | 2026-04-19 00:16:50 |
| 合計ジャッジ時間 | 7,125 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 1 |
| other | TLE * 1 -- * 12 |
ソースコード
import math
N = int(input())
Mod = 998244353
total_sum = 0
for i in range(1, N + 1):
product = i
k = 2
while True:
term = int(pow(i, 1/k) + 1e-9)
if term <= 1:
break
product = (product * term) % Mod
k += 1
total_sum = (total_sum + product) % Mod
print(total_sum % Mod)
YuukunA