結果

問題 No.375 立方体のN等分 (1)
ユーザー pluto77pluto77
提出日時 2016-06-07 08:06:51
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 224 ms / 5,000 ms
コード長 219 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 76,448 KB
実行使用メモリ 77,948 KB
最終ジャッジ日時 2024-04-20 02:12:33
合計ジャッジ時間 3,989 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
75,684 KB
testcase_01 AC 66 ms
75,680 KB
testcase_02 AC 126 ms
77,948 KB
testcase_03 AC 66 ms
75,808 KB
testcase_04 AC 62 ms
75,668 KB
testcase_05 AC 63 ms
75,544 KB
testcase_06 AC 69 ms
76,168 KB
testcase_07 AC 73 ms
76,944 KB
testcase_08 AC 89 ms
77,864 KB
testcase_09 AC 70 ms
76,532 KB
testcase_10 AC 73 ms
76,560 KB
testcase_11 AC 73 ms
76,720 KB
testcase_12 AC 74 ms
76,812 KB
testcase_13 AC 76 ms
76,480 KB
testcase_14 AC 142 ms
77,568 KB
testcase_15 AC 80 ms
76,712 KB
testcase_16 AC 75 ms
76,844 KB
testcase_17 AC 197 ms
77,448 KB
testcase_18 AC 150 ms
77,464 KB
testcase_19 AC 78 ms
76,604 KB
testcase_20 AC 71 ms
76,700 KB
testcase_21 AC 73 ms
76,556 KB
testcase_22 AC 224 ms
77,868 KB
testcase_23 AC 75 ms
76,444 KB
testcase_24 AC 74 ms
76,552 KB
testcase_25 AC 97 ms
76,696 KB
testcase_26 AC 78 ms
76,828 KB
testcase_27 AC 81 ms
76,832 KB
testcase_28 AC 69 ms
76,712 KB
testcase_29 AC 69 ms
76,588 KB
testcase_30 AC 79 ms
76,832 KB
testcase_31 AC 78 ms
76,716 KB
testcase_32 AC 69 ms
76,432 KB
testcase_33 AC 75 ms
76,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: utf-8
#yuki375

import math


n=int(raw_input())
temp=n
i=1
while i**3<=n:
 if n%i==0:
  m=n/i
  j=1
  while j*j<=m:
   if m%j==0:
    k=m/j
    if temp>i+j+k-3:
     temp=i+j+k-3
   j+=1
 i+=1

print temp,n-1
0