제출 #16951

#제출 시각아이디문제언어결과실행 시간메모리
16951taehoon1018MathWorlds (YDX13_mathworlds)C++98
0 / 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 (x / (float)y == z)
	{
		count++;
		ch = '/';
	}

	if (count == 1)
		printf("%c", ch);
	else
		printf("Invalid");

}
#Verdict Execution timeMemoryGrader output
Fetching results...