Submission #1184077
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*127-127+awal; else ans=n*127-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 | 0 |
Code Size | 276 Byte |
Status | WA |
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 | 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 | AC | 1 ms | 256 KB |
random_00.txt | WA | 3 ms | 256 KB |
random_01.txt | WA | 4 ms | 256 KB |
random_02.txt | WA | 3 ms | 256 KB |
random_03.txt | WA | 3 ms | 256 KB |
random_04.txt | WA | 3 ms | 256 KB |