제출 #16965

#제출 시각아이디문제언어결과실행 시간메모리
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...