結果
| 問題 |
No.3296 81-like number
|
| コンテスト | |
| ユーザー |
ID 21712
|
| 提出日時 | 2025-10-19 18:31:32 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 244 bytes |
| コンパイル時間 | 11,804 ms |
| コンパイル使用メモリ | 238,320 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-19 18:31:45 |
| 合計ジャッジ時間 | 12,496 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
package main
import . "fmt"
func main() {
var n int
Scan(&n)
var f [1e5+1]bool
sum:=0
for p:=2;p*p<=n;p++ {
if f[p] {
continue
}
for k:=p;k*k<=n;k+=p {
f[k]=true
}
for t:=p;t*p<=n;t*=p {
sum+=t*p
}
}
Println(sum)
}
ID 21712