Submission #389467


Source Code Expand

import itertools

tlist = list(map(int, input().split()))
alist = tlist[0:3]
blist = tlist[3:6]
mind = 9999999999999999
for a in list(itertools.permutations(alist)):
    for b in list(itertools.permutations(blist)):
        d = 0
        d += abs(a[0] - b[0])
        d += abs(a[1] - b[1])
        d += abs(a[2] - b[2])
        mind = min(mind, d)
print(mind)

Submission Info

Submission Time
Task A - マッサージチェア
User yumechi
Language Python (3.2.3)
Score 100
Code Size 372 Byte
Status AC
Exec Time 202 ms
Memory 8824 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 25
Set Name Test Cases
All random-00.txt, random-01.txt, random-02.txt, random-03.txt, random-04.txt, random-05.txt, random-06.txt, random-07.txt, random-08.txt, random-09.txt, random-10.txt, random-11.txt, random-12.txt, random-13.txt, random-14.txt, random-15.txt, random-16.txt, random-17.txt, random-18.txt, random-19.txt, test-00.txt, test-01.txt, test-02.txt, test-03.txt, test-04.txt
Case Name Status Exec Time Memory
random-00.txt AC 138 ms 8692 KB
random-01.txt AC 139 ms 8664 KB
random-02.txt AC 139 ms 8692 KB
random-03.txt AC 146 ms 8788 KB
random-04.txt AC 141 ms 8660 KB
random-05.txt AC 142 ms 8788 KB
random-06.txt AC 143 ms 8816 KB
random-07.txt AC 145 ms 8668 KB
random-08.txt AC 146 ms 8692 KB
random-09.txt AC 142 ms 8700 KB
random-10.txt AC 149 ms 8824 KB
random-11.txt AC 202 ms 8824 KB
random-12.txt AC 197 ms 8696 KB
random-13.txt AC 201 ms 8696 KB
random-14.txt AC 189 ms 8696 KB
random-15.txt AC 179 ms 8816 KB
random-16.txt AC 139 ms 8668 KB
random-17.txt AC 142 ms 8716 KB
random-18.txt AC 144 ms 8820 KB
random-19.txt AC 142 ms 8764 KB
test-00.txt AC 147 ms 8768 KB
test-01.txt AC 143 ms 8696 KB
test-02.txt AC 141 ms 8696 KB
test-03.txt AC 141 ms 8784 KB
test-04.txt AC 140 ms 8668 KB