Submission #8802383
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 | 376 Byte |
Status | WA |
Exec Time | 1927 ms |
Memory | 13196 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 | WA | 809 ms | 12812 KB |
02.txt | WA | 1657 ms | 13196 KB |
03.txt | WA | 730 ms | 12684 KB |
04.txt | WA | 1029 ms | 12812 KB |
05.txt | WA | 885 ms | 12812 KB |
06.txt | WA | 149 ms | 12444 KB |
07.txt | WA | 151 ms | 12444 KB |
08.txt | WA | 149 ms | 12444 KB |
09.txt | WA | 149 ms | 12444 KB |
10.txt | WA | 153 ms | 12444 KB |
11.txt | WA | 592 ms | 12684 KB |
12.txt | WA | 1399 ms | 12940 KB |
13.txt | WA | 353 ms | 12556 KB |
14.txt | WA | 153 ms | 12444 KB |
15.txt | WA | 215 ms | 12444 KB |
16.txt | WA | 1927 ms | 13196 KB |
sample_01.txt | WA | 149 ms | 12444 KB |
sample_02.txt | WA | 149 ms | 12444 KB |
sample_03.txt | WA | 846 ms | 12812 KB |