Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
413 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
	int a, b, c, e, s,summ;
	cin >> a >> b >> c;
	summ = a + b + c;
	if (summ % 2 == 0 && summ % 10 == 6) {
		summ = 1;
	}
	if (summ % 2 != 0 && summ % 10 == 9) {
		summ = 2;
	}
	switch (summ) {
	case 1: {
		cout << "magic";
		break;
	}
	case 2: {
		cout << "magic";
		break;
	}
	default: {
		cout << "nomagic";
		break;
	}
	}
	
}