Submission #3590957
Source Code Expand
s = input() x = [] l = len(s) for i in range(l): x.append(int(s[i])) sum = 0 for n in range(2**(l-1)): bin_str = format(i,'0'+str(l-1)+'b') prev = 0 flg = 0 for i in range(l-1): if bin_str[i]==0: prev = prev*10 + x[i] else: sum += prev*10 + x[i] prev = 0 sum += prev*10 + x[l-1] print(sum)
Submission Info
Submission Time | |
---|---|
Task | C - Many Formulas |
User | Gaozou97 |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 388 Byte |
Status | WA |
Exec Time | 21 ms |
Memory | 3064 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
Status | AC |
|
Set Name | Test Cases |
---|---|
Sample | |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | WA | 21 ms | 3060 KB |
02.txt | WA | 20 ms | 3064 KB |
03.txt | WA | 20 ms | 3060 KB |
04.txt | AC | 18 ms | 3064 KB |
05.txt | WA | 18 ms | 3064 KB |
06.txt | WA | 18 ms | 3060 KB |
07.txt | WA | 20 ms | 3060 KB |
08.txt | WA | 20 ms | 3064 KB |
09.txt | WA | 18 ms | 3060 KB |
10.txt | WA | 18 ms | 3060 KB |
sample_01.txt | WA | 18 ms | 3064 KB |
sample_02.txt | WA | 20 ms | 3060 KB |