Submission #3588341


Source Code Expand

T = int(input())
ts = [tuple(map(int,input().split())) for i in range(T)]

def solve(n,d):
    if n%2:
        return d + 127*(n-1)
    else:
        return d^127 + 127*(n-1)

for n,d in ts:
    print(solve(n,d))

Submission Info

Submission Time
Task C - Cookie Breeding Machine
User prd_xxx
Language Python (3.4.3)
Score 0
Code Size 222 Byte
Status WA
Exec Time 22 ms
Memory 3316 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 1
WA × 5
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 18 ms 2940 KB
random_00.txt WA 21 ms 3316 KB
random_01.txt WA 21 ms 3316 KB
random_02.txt WA 21 ms 3316 KB
random_03.txt WA 22 ms 3316 KB
random_04.txt WA 21 ms 3316 KB