結果

問題 No.375 立方体のN等分 (1)
ユーザー tabataba
提出日時 2017-05-19 22:30:07
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 571 bytes
コンパイル時間 969 ms
コンパイル使用メモリ 113,256 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-19 02:51:01
合計ジャッジ時間 8,717 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <random>
#include <vector>
#include <algorithm>
#include <array>
#include <functional>
#include <utility>
#include <regex>
#include <tuple>
#include <map>
#include <set>
#include <iostream>

using namespace std;

int main(){
	int64_t n,t;
	-scanf("%ld",&n);
	t=n;
	vector<int64_t> soi;
	for(int64_t i=2;n>1;i++){
		while(n%i==0){
			n/=i;
			soi.push_back(i);
		}
	}
	int64_t sum=0;
	for(auto i:soi){
		sum+=i;
	}
	sum-=min(soi.size(),(size_t)3);
	printf("%ld %ld\n",sum,t-1);
	return 0;
}
0