結果
問題 |
No.375 立方体のN等分 (1)
|
ユーザー |
![]() |
提出日時 | 2016-06-04 23:16:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 350 bytes |
コンパイル時間 | 1,468 ms |
コンパイル使用メモリ | 158,876 KB |
実行使用メモリ | 10,020 KB |
最終ジャッジ日時 | 2024-10-08 09:32:43 |
合計ジャッジ時間 | 49,957 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 TLE * 2 -- * 16 |
ソースコード
#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; }