結果

問題 No.375 立方体のN等分 (1)
ユーザー nksk38nksk38
提出日時 2017-08-02 17:34:15
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 697 bytes
コンパイル時間 932 ms
コンパイル使用メモリ 79,392 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 13:34:26
合計ジャッジ時間 39,554 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()

using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ll, string> pls;

int main()
{
	ll N,mx,mi=0,num;
	cin >> N;

	mx = N - 1;
	mi = 1e11;
	for (int i = 1; i < 10000; i++) {
		for (int j = 1; j < 10000; j++) {
			if (N % (i*j) == 0) {
				mi = min(i - 1 + j - 1+(N/(i*j))-1,mi);
			}
		}
	}
	
	cout << mi << " " << mx << endl;
	return 0;
}
0