Submission #3168574


Source Code Expand

T = int(input())
for _ in range(T):
    N,D = map(int,input().split())
    if N%2==0:
        print(N*127-D)
    else:
        print((N-1)*127+D)

Submission Info

Submission Time
Task C - Cookie Breeding Machine
User morio__
Language Python (3.4.3)
Score 100
Code Size 151 Byte
Status AC
Exec Time 25 ms
Memory 2940 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 6
Set Name Test Cases
All 00_sample.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt
Case Name Status Exec Time Memory
00_sample.txt AC 17 ms 2940 KB
random_00.txt AC 25 ms 2940 KB
random_01.txt AC 25 ms 2940 KB
random_02.txt AC 25 ms 2940 KB
random_03.txt AC 25 ms 2940 KB
random_04.txt AC 25 ms 2940 KB