Submission #2559393
Source Code Expand
import sys H,W = map(int,input().split()) if H%3 ==0: print(0) sys.exit() if W%3 ==0: print(0) sys.exit() A=[H,W] for h in range(H): w = W//2 sa = h*W sb = (H-h)*w sc = (H-h)*(W-w) A.append(max(sa,sb,sc)-min(sa,sb,sc)) for h in range(W): w = H//2 sa = h*H sb = (W-h)*w sc = (W-h)*(H-w) A.append(max(sa,sb,sc)-min(sa,sb,sc)) print(min(A))
Submission Info
Submission Time | |
---|---|
Task | C - Chocolate Bar |
User | okumura |
Language | Python (3.4.3) |
Score | 400 |
Code Size | 414 Byte |
Status | AC |
Exec Time | 236 ms |
Memory | 11052 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt, 0_04.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt, 0_04.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 17 ms | 3064 KB |
0_01.txt | AC | 17 ms | 3064 KB |
0_02.txt | AC | 17 ms | 3064 KB |
0_03.txt | AC | 128 ms | 7060 KB |
0_04.txt | AC | 236 ms | 11052 KB |
1_00.txt | AC | 17 ms | 3064 KB |
1_01.txt | AC | 134 ms | 7084 KB |
1_02.txt | AC | 18 ms | 3064 KB |
1_03.txt | AC | 17 ms | 3064 KB |
1_04.txt | AC | 82 ms | 5420 KB |
1_05.txt | AC | 154 ms | 7724 KB |
1_06.txt | AC | 17 ms | 3064 KB |
1_07.txt | AC | 17 ms | 3064 KB |
1_08.txt | AC | 139 ms | 7212 KB |
1_09.txt | AC | 151 ms | 7980 KB |
1_10.txt | AC | 193 ms | 9484 KB |
1_11.txt | AC | 17 ms | 3064 KB |
1_12.txt | AC | 17 ms | 3064 KB |
1_13.txt | AC | 129 ms | 7084 KB |
1_14.txt | AC | 79 ms | 5268 KB |