답안 #16959

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
16959 2015-11-03T03:28:47 Z taehoon1018 MathWorlds (YDX13_mathworlds) C++
0 / 1
0 ms 1084 KB
#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 -