結果

問題 No.376 立方体のN等分 (2)
ユーザー Lay_ecLay_ec
提出日時 2016-06-04 23:32:19
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 565 bytes
コンパイル時間 932 ms
コンパイル使用メモリ 88,532 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 01:32:44
合計ジャッジ時間 34,788 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 AC 436 ms
5,376 KB
testcase_03 AC 830 ms
5,376 KB
testcase_04 AC 599 ms
5,376 KB
testcase_05 WA -
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 14 ms
5,376 KB
testcase_09 AC 56 ms
5,376 KB
testcase_10 AC 659 ms
5,376 KB
testcase_11 AC 165 ms
5,376 KB
testcase_12 AC 360 ms
5,376 KB
testcase_13 AC 178 ms
5,376 KB
testcase_14 AC 218 ms
5,376 KB
testcase_15 AC 165 ms
5,376 KB
testcase_16 AC 4,104 ms
5,376 KB
testcase_17 AC 383 ms
5,376 KB
testcase_18 AC 187 ms
5,376 KB
testcase_19 AC 687 ms
5,376 KB
testcase_20 AC 223 ms
5,376 KB
testcase_21 AC 4,600 ms
5,376 KB
testcase_22 AC 204 ms
5,376 KB
testcase_23 AC 4,857 ms
5,376 KB
testcase_24 AC 4,887 ms
5,376 KB
testcase_25 AC 207 ms
5,376 KB
testcase_26 TLE -
testcase_27 AC 280 ms
5,376 KB
testcase_28 AC 209 ms
5,376 KB
testcase_29 AC 389 ms
5,376 KB
testcase_30 AC 285 ms
5,376 KB
testcase_31 AC 208 ms
5,376 KB
testcase_32 AC 280 ms
5,376 KB
testcase_33 AC 209 ms
5,376 KB
testcase_34 AC 208 ms
5,376 KB
testcase_35 AC 334 ms
5,376 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 347 ms
5,376 KB
testcase_39 AC 381 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;

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

	long long Tmin=n;
	
	for(long long a=1;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<<" "<<n-1<<endl;

	
	return 0;
}
0