Submission #1184100
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define INF 10001 int ans=0; int main() { int tc; scanf("%d",&tc); while(tc--) { int n,awal,ans; cin>>n>>awal; if(n%2==1) ans=(n-1)*127+awal; else ans=(n-1)*127+(127^awal); cout<<ans<<endl; } }
Submission Info
Submission Time | |
---|---|
Task | C - Cookie Breeding Machine |
User | Yehezkiel |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 278 Byte |
Status | AC |
Exec Time | 4 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:8:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&tc); ^
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 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 | AC | 1 ms | 256 KB |
random_00.txt | AC | 4 ms | 256 KB |
random_01.txt | AC | 3 ms | 256 KB |
random_02.txt | AC | 3 ms | 256 KB |
random_03.txt | AC | 4 ms | 256 KB |
random_04.txt | AC | 3 ms | 256 KB |