結果

問題 No.375 立方体のN等分 (1)
ユーザー Lay_ecLay_ec
提出日時 2016-06-04 23:04:33
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 559 bytes
コンパイル時間 693 ms
コンパイル使用メモリ 79,864 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-17 00:59:43
合計ジャッジ時間 1,609 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 WA -
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 2 ms
5,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 WA -
testcase_26 AC 4 ms
5,376 KB
testcase_27 WA -
testcase_28 AC 3 ms
5,376 KB
testcase_29 AC 5 ms
5,376 KB
testcase_30 AC 4 ms
5,376 KB
testcase_31 AC 3 ms
5,376 KB
testcase_32 AC 4 ms
5,376 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>
#include <stack>

using namespace std;

const long long mod=1000000007; 

double PI =3.141592653589793;

int main()
{
	long long n;
	cin>>n;

	long long Tmax=n-1;
	long long Tmin=0;
	
	for(long long i=2;i*i<=n;i++){
		while(n%i==0){
			Tmin+=i-1;
			n/=i;
		}
	}
	Tmin+=n-1;
	
	cout<<Tmin<<" "<<Tmax<<endl;

	
	return 0;
}
0