Tag: April Fools Contest 2017

April Fools Contest 2017, problem: (G) BF Calculator Solution in C/C++

#include<cstdio> int main() { int ans=0,a=0; char c; scanf(“%d”,&ans); while (scanf(“%c%d”,&c,&a) != EOF) { if (c==’+’) ans+=a; if (c==’-‘) ans-=a; } a=0; if (ans==0) { printf(“++++++++++++++++++++++++++++++++++++++++++++++++.”); return 0; } while (ans) { int x=ans%10; for (int...

April Fools Contest 2017, problem: (F) Crunching Numbers Just for You Solution in C

#include <stdio.h> #include<algorithm> #include<time.h> using namespace std; int a; int main() { int n,i; clock_t t0; ...

April Fools Contest 2017, problem: (D) Touchy-Feely Palindromes Solution in C

#include <stdio.h> #include <string.h> int main(){ int i, num, flag=0; char str; scanf(“%s”, str); num = strlen(str); if(num == 1){ if(str == ‘3’ || str...

April Fools Contest 2017, problem: (B) Kids’ Riddle Solution in C

#include<stdio.h> int main(void) { unsigned x, y, result = 0; scanf(“%u”, &x); do { y = x & 15; x >>= 4; if (y ==...

April Fools Contest 2017, problem: (A) Numbers Joke Solution in C

#include<stdio.h> int main(void) { int mas = {4, 22, 27, 58, 85, 94, 121, 166, 202, 265, 274, 319, 346,...

Want to stay up to date with the latest news?

We would love to hear from you! Please fill in your details and we will stay in touch. It's that simple!