結果
問題 |
No.375 立方体のN等分 (1)
|
ユーザー |
![]() |
提出日時 | 2016-06-04 23:12:35 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 352 bytes |
コンパイル時間 | 679 ms |
コンパイル使用メモリ | 63,756 KB |
実行使用メモリ | 10,020 KB |
最終ジャッジ日時 | 2024-10-08 09:22:18 |
合計ジャッジ時間 | 7,060 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 1 -- * 31 |
ソースコード
#include <iostream> #include <stdio.h> #include <math.h> #include <vector> #include <algorithm> using namespace std; int main(){ int n; cin >> n; int s=0,l=0; l=n-1; while(true){ for(int i=2;i<=n;i++){ if(n%i == 0){ n = n/i; // s++; s += i-1; break; } } if(n==1) break; } // s++; cout << s <<" "<< l<<endl; }