結果
問題 | No.375 立方体のN等分 (1) |
ユーザー | vwxyz |
提出日時 | 2023-04-03 10:16:55 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 3,569 ms / 5,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 350 ms |
コンパイル使用メモリ | 11,816 KB |
実行使用メモリ | 10,188 KB |
最終ジャッジ日時 | 2023-10-25 05:19:07 |
合計ジャッジ時間 | 10,320 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 29 ms
10,020 KB |
testcase_01 | AC | 30 ms
10,020 KB |
testcase_02 | AC | 96 ms
10,028 KB |
testcase_03 | AC | 29 ms
10,020 KB |
testcase_04 | AC | 29 ms
10,020 KB |
testcase_05 | AC | 28 ms
10,020 KB |
testcase_06 | AC | 30 ms
10,020 KB |
testcase_07 | AC | 41 ms
10,020 KB |
testcase_08 | AC | 255 ms
10,052 KB |
testcase_09 | AC | 51 ms
10,020 KB |
testcase_10 | AC | 59 ms
10,020 KB |
testcase_11 | AC | 61 ms
10,020 KB |
testcase_12 | AC | 64 ms
10,020 KB |
testcase_13 | AC | 69 ms
10,020 KB |
testcase_14 | AC | 537 ms
10,080 KB |
testcase_15 | AC | 72 ms
10,020 KB |
testcase_16 | AC | 74 ms
10,020 KB |
testcase_17 | AC | 2,079 ms
10,152 KB |
testcase_18 | AC | 555 ms
10,080 KB |
testcase_19 | AC | 77 ms
10,020 KB |
testcase_20 | AC | 79 ms
10,020 KB |
testcase_21 | AC | 79 ms
10,020 KB |
testcase_22 | AC | 3,569 ms
10,188 KB |
testcase_23 | AC | 81 ms
10,020 KB |
testcase_24 | AC | 81 ms
10,020 KB |
testcase_25 | AC | 99 ms
10,024 KB |
testcase_26 | AC | 81 ms
10,020 KB |
testcase_27 | AC | 80 ms
10,020 KB |
testcase_28 | AC | 81 ms
10,020 KB |
testcase_29 | AC | 79 ms
10,020 KB |
testcase_30 | AC | 81 ms
10,020 KB |
testcase_31 | AC | 80 ms
10,020 KB |
testcase_32 | AC | 81 ms
10,020 KB |
testcase_33 | AC | 81 ms
10,020 KB |
ソースコード
import sys readline=sys.stdin.readline def Divisors(N): divisors=[] for i in range(1,N+1): if i**2>=N: break elif N%i==0: divisors.append(i) if i**2==N: divisors+=[i]+[N//i for i in divisors[::-1]] else: divisors+=[N//i for i in divisors[::-1]] return divisors N=int(readline()) ans=1<<60 D=Divisors(N) for d0 in D: for d1 in D: if N%(d0*d1): continue d2=N//d0//d1 ans=min(ans,d0+d1+d2-3) print(ans,N-1)