Submission #8802398
Source Code Expand
import numpy as np N = int(input()) dp = [float("inf")]*(N + 1) dp[0] = 0 pull_list_9 = [9**i for i in range(1, 6)] pull_list_6 = [6**i for i in range(1, 7)] pull_list = np.array(pull_list_9 + pull_list_6 + [1]) p_s = sorted(pull_list) for i in range(1, N + 1): for j in p_s: if i - j < 0: break dp[i] = min(dp[i], dp[i-j] + 1) print(dp[-1])
Submission Info
Submission Time | |
---|---|
Task | C - Strange Bank |
User | rokki_ac |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 374 Byte |
Status | TLE |
Exec Time | 2108 ms |
Memory | 21840 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 1520 ms | 21840 KB |
02.txt | TLE | 2108 ms | 13196 KB |
03.txt | AC | 1205 ms | 12684 KB |
04.txt | AC | 1925 ms | 12812 KB |
05.txt | AC | 1527 ms | 12812 KB |
06.txt | AC | 146 ms | 12444 KB |
07.txt | AC | 146 ms | 12444 KB |
08.txt | AC | 146 ms | 12444 KB |
09.txt | AC | 146 ms | 12444 KB |
10.txt | AC | 154 ms | 12444 KB |
11.txt | AC | 980 ms | 12684 KB |
12.txt | TLE | 2108 ms | 12940 KB |
13.txt | AC | 541 ms | 12556 KB |
14.txt | AC | 154 ms | 12444 KB |
15.txt | AC | 269 ms | 12444 KB |
16.txt | TLE | 2108 ms | 13196 KB |
sample_01.txt | AC | 148 ms | 12444 KB |
sample_02.txt | AC | 146 ms | 12444 KB |
sample_03.txt | AC | 1479 ms | 12812 KB |