結果

問題 No.376 立方体のN等分 (2)
ユーザー Lay_ecLay_ec
提出日時 2016-06-04 23:27:52
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 653 bytes
コンパイル時間 946 ms
コンパイル使用メモリ 88,908 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-17 01:26:34
合計ジャッジ時間 28,337 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 WA -
testcase_02 AC 317 ms
5,376 KB
testcase_03 AC 689 ms
5,376 KB
testcase_04 AC 458 ms
5,376 KB
testcase_05 WA -
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 WA -
testcase_09 AC 31 ms
5,376 KB
testcase_10 AC 566 ms
5,376 KB
testcase_11 AC 109 ms
5,376 KB
testcase_12 AC 269 ms
5,376 KB
testcase_13 AC 101 ms
5,376 KB
testcase_14 AC 130 ms
5,376 KB
testcase_15 WA -
testcase_16 AC 3,577 ms
5,376 KB
testcase_17 AC 276 ms
5,376 KB
testcase_18 WA -
testcase_19 AC 565 ms
5,376 KB
testcase_20 AC 114 ms
5,376 KB
testcase_21 AC 4,081 ms
5,376 KB
testcase_22 AC 92 ms
5,376 KB
testcase_23 AC 4,253 ms
5,376 KB
testcase_24 AC 4,283 ms
5,376 KB
testcase_25 AC 91 ms
5,376 KB
testcase_26 AC 4,437 ms
6,944 KB
testcase_27 WA -
testcase_28 AC 92 ms
5,376 KB
testcase_29 AC 255 ms
5,376 KB
testcase_30 AC 161 ms
5,376 KB
testcase_31 WA -
testcase_32 AC 165 ms
5,376 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 205 ms
5,376 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 217 ms
5,376 KB
testcase_39 AC 254 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

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=n;
	
	for(long long a=2;a*a<=n;a++){
		if(n%a) continue;
		long long m=n/a;
		for(long long b=a;b*b<=m;b++){
			if(m%b) continue;
			
			long long c=m/b;
			Tmin=min(Tmin,a+b+c);
		}
	}
	
	cout<<Tmin-3<<" "<<Tmax<<endl;

	
	return 0;
}
0