結果

問題 No.375 立方体のN等分 (1)
ユーザー sio_puyosio_puyo
提出日時 2016-06-04 23:16:01
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 350 bytes
コンパイル時間 1,369 ms
コンパイル使用メモリ 158,036 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 01:11:31
合計ジャッジ時間 49,247 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,679 ms
5,248 KB
testcase_01 AC 1,242 ms
5,248 KB
testcase_02 AC 3,146 ms
5,376 KB
testcase_03 AC 1,732 ms
5,376 KB
testcase_04 AC 1,700 ms
5,376 KB
testcase_05 AC 1,840 ms
5,376 KB
testcase_06 AC 1,167 ms
5,376 KB
testcase_07 AC 1,999 ms
5,376 KB
testcase_08 AC 4,431 ms
5,376 KB
testcase_09 AC 1,217 ms
5,376 KB
testcase_10 AC 2,311 ms
5,376 KB
testcase_11 AC 1,630 ms
5,376 KB
testcase_12 AC 2,158 ms
5,376 KB
testcase_13 AC 2,026 ms
5,376 KB
testcase_14 AC 4,985 ms
5,376 KB
testcase_15 AC 2,283 ms
5,376 KB
testcase_16 AC 1,789 ms
5,376 KB
testcase_17 TLE -
testcase_18 TLE -
testcase_19 AC 2,183 ms
5,376 KB
testcase_20 AC 1,160 ms
5,376 KB
testcase_21 AC 1,150 ms
5,376 KB
testcase_22 TLE -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main(){
  LL n;
  cin >> n;
  LL answer=1048576;
  answer*=answer;
  for(LL a=1;a<11234;++a){
    if(n%a) continue;
    for(LL b=a;a*b<112345678;++b){
      if(n/a%b) continue;
      answer=min(answer,a+b+n/a/b-3);
    }
  }
  cout << answer << ' ' << n-1 << endl;
  return 0;
}
0