Submission #19134

# Submission time Handle Problem Language Result Execution time Memory
19134 2016-02-18T17:18:02 Z eaststar MathWorlds (YDX13_mathworlds) C++14
0 / 1
0 ms 1084 KB
#include <stdio.h>
char a[9]=" +-*/";
int main(){
    long long x,y,z,s,t=0;
    scanf("%lld%lld%lld",&x,&y,&z);
    if(x+y==z)s=1,++t;
    if(x-y==z)s=2,++t;
    if(x*y==z)s=3,++t;
    if(x%y==0&&x/y==z)s=4,++t;
    if(t!=1)puts("Invalid");
    else putchar(a[s]);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Runtime error 0 ms 1080 KB SIGFPE Floating point exception
4 Halted 0 ms 0 KB -