結果
問題 | No.1737 One to N |
ユーザー |
👑 |
提出日時 | 2022-01-19 22:03:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 223 bytes |
コンパイル時間 | 680 ms |
コンパイル使用メモリ | 62,848 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 14:06:07 |
合計ジャッジ時間 | 1,590 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#include <iostream>using namespace std;int main(){int n;cin>>n;int ans = 0;for(int i = 2; n > 1; i++){while(!(n%i)){ans+=i;n/=i;}}cout << ans << endl;}