結果

問題 No.375 立方体のN等分 (1)
ユーザー ayaoniayaoni
提出日時 2020-12-07 20:23:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 691 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 81,864 KB
実行使用メモリ 62,604 KB
最終ジャッジ日時 2023-10-17 16:38:45
合計ジャッジ時間 3,223 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,828 KB
testcase_01 AC 35 ms
53,828 KB
testcase_02 AC 42 ms
59,932 KB
testcase_03 AC 35 ms
53,828 KB
testcase_04 AC 35 ms
53,828 KB
testcase_05 AC 35 ms
53,828 KB
testcase_06 AC 39 ms
59,920 KB
testcase_07 AC 41 ms
59,932 KB
testcase_08 AC 41 ms
59,920 KB
testcase_09 AC 42 ms
59,932 KB
testcase_10 AC 41 ms
59,932 KB
testcase_11 AC 47 ms
59,932 KB
testcase_12 AC 48 ms
59,932 KB
testcase_13 AC 48 ms
59,932 KB
testcase_14 AC 41 ms
59,988 KB
testcase_15 WA -
testcase_16 AC 44 ms
59,932 KB
testcase_17 AC 44 ms
60,424 KB
testcase_18 AC 41 ms
60,008 KB
testcase_19 AC 51 ms
59,936 KB
testcase_20 AC 44 ms
59,924 KB
testcase_21 AC 41 ms
59,924 KB
testcase_22 AC 46 ms
62,604 KB
testcase_23 AC 48 ms
59,936 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 40 ms
59,924 KB
testcase_27 AC 51 ms
59,936 KB
testcase_28 AC 40 ms
59,924 KB
testcase_29 AC 37 ms
57,864 KB
testcase_30 AC 47 ms
59,936 KB
testcase_31 AC 51 ms
59,936 KB
testcase_32 AC 43 ms
59,924 KB
testcase_33 AC 44 ms
59,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
ans = N-1
for i in range(1,int(N**(1/3)+1)):
    if N % i == 0:
        M = N//i
        for j in range(int(M**.5)+1,0,-1):
            if M % j == 0:
                ans = min(ans,i+j+M//j-3)
                break

print(ans,N-1)
0