Submission #19136

# Submission time Handle Problem Language Result Execution time Memory
19136 2016-02-18T17:20:07 Z eaststar MathWorlds (YDX13_mathworlds) C
0 / 1
0 ms 1084 KB
#include <stdio.h>
char *a="+-*/";
int main(){
    long long x,y,z,s,t=0;
    scanf("%lld%lld%lld",&x,&y,&z);
    if(x+y==z)s=0,++t;
    if(x-y==z)s=1,++t;
    if(x*y==z)s=2,++t;
    if(x%y==0&&x/y==z)s=3,++t;
    if(t==1)putchar(a[s]);
    else puts("Invalid");
    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 -