結果
問題 |
No.1737 One to N
|
ユーザー |
|
提出日時 | 2022-10-13 21:58:08 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 242 bytes |
コンパイル時間 | 10,467 ms |
コンパイル使用メモリ | 229,456 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 12:10:46 |
合計ジャッジ時間 | 11,589 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
// No.1737 One to N // 1 <= N <= 3e5 package main import ( "fmt" ) func main() { var N int fmt.Scan(&N) k := 0 n := N for p := 2; p*p <= n; p++ { for n%p == 0 { n /= p k += p } } if n > 1 { k += n } fmt.Println(k) }