Submission #1819978
Source Code Expand
#include <bits/stdc++.h> using namespace std; long q,n,d; int a[8]; void np(long & n,long i) { if(n>=pow(2,i-1)) { a[i]=1; n=n-pow(2,i); } else a[i]=0; } int main() { cin>>q; while(q--) { cin>>n>>d; if(n%2==1) cout<<(n-1)*127+d; else{ long cc=(d^127); cout<<(n-1)*127+cc; } cout<<endl; } }
Submission Info
Submission Time | |
---|---|
Task | C - Cookie Breeding Machine |
User | vjudge1 |
Language | Bash (GNU bash v4.3.11) |
Score | 0 |
Code Size | 387 Byte |
Status | RE |
Exec Time | 3 ms |
Memory | 552 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
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 | RE | 3 ms | 544 KB |
random_00.txt | RE | 3 ms | 540 KB |
random_01.txt | RE | 3 ms | 548 KB |
random_02.txt | RE | 3 ms | 552 KB |
random_03.txt | RE | 3 ms | 544 KB |
random_04.txt | RE | 3 ms | 548 KB |