Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <algorithm>
- #include <cstring>
- using namespace std;
- #define LIMIT 100
- char buffer[LIMIT], * pos = buffer + LIMIT;
- inline char getnext(){
- if (pos == buffer + LIMIT){
- pos = buffer;
- fread(buffer, 1, LIMIT, stdin);
- }
- return *pos++;
- }
- inline int getint(){
- int num = 0;
- char cc;
- while (!isdigit(cc = getnext()));
- do { num = num * 10 + cc - '0'; } while (isdigit(cc = getnext()));
- return num;
- }
- int main()
- {int t=getint();
- while(t--){
- int n=getint();
- if(n%2==0)printf("%d\n",n);
- else printf("%d\n",n-1);
- }
- }
Add Comment
Please, Sign In to add comment