Submission #42130954


Source Code Expand

p,q = input().split()

dist = [0,3,4,8,9,14,23]

p1=ord(p)-ord('A')
p2=ord(q)-ord('A')

d1=dist[p1]
d2=dist[p2]

print(abs(d1-d2))

Submission Info

Submission Time
Task B - ABCDEFG
User yab
Language Python (3.8.2)
Score 200
Code Size 140 Byte
Status AC
Exec Time 25 ms
Memory 9096 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 14
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 17 ms 9036 KiB
00_sample_01.txt AC 17 ms 8904 KiB
00_sample_02.txt AC 23 ms 9096 KiB
01_handmade_00.txt AC 22 ms 8964 KiB
01_handmade_01.txt AC 19 ms 9004 KiB
01_handmade_02.txt AC 22 ms 8888 KiB
02_random_00.txt AC 19 ms 8800 KiB
02_random_01.txt AC 22 ms 8904 KiB
02_random_02.txt AC 17 ms 8808 KiB
02_random_03.txt AC 20 ms 8960 KiB
02_random_04.txt AC 25 ms 8828 KiB
02_random_05.txt AC 18 ms 8904 KiB
02_random_06.txt AC 21 ms 8916 KiB
02_random_07.txt AC 25 ms 8908 KiB