#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 / float(y) == z)
{
ch = '/';
count++;
printf("yes");
}
if (count == 1)
printf("%c", ch);
else
printf("Invalid");
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Correct |
0 ms |
1084 KB |
Output is correct |
3 |
Correct |
0 ms |
1084 KB |
Output is correct |
4 |
Correct |
0 ms |
1084 KB |
Output is correct |
5 |
Correct |
0 ms |
1084 KB |
Output is correct |
6 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
7 |
Halted |
0 ms |
0 KB |
- |