Submission #16965

#TimeUsernameProblemLanguageResultExecution timeMemory
16965taehoon1018MathWorlds (YDX13_mathworlds)C++98
1 / 1
0 ms1084 KiB
#include <stdio.h> int main(void) { int x, y, z, count = 0; char ch; scanf("%d%d%d", &x, &y, &z); if (x + y == z) { count++; ch = '+'; } if (x - y == z) { ch = '-'; count++; } if (x*y == z) { ch = '*'; count++; } if (y != 0 && x / y == z && x % y ==0) { ch = '/'; count++; } if (count == 1) printf("%c", ch); else printf("Invalid"); }
#Verdict Execution timeMemoryGrader output
Fetching results...