[BOJ 13985] Equality
View as PDF
Submit solution
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
Points:
1
Time limit:
1.0s
Memory limit:
512M
Problem types
Allowed languages
You are grading an arithmetic quiz. The quiz asks a student for the sum of the numbers. Determine if the student taking the quiz got the question correct.
입력 형식
The first and the only line of input contains a string of the form:</p>
a + b = c
It is guaranteed that a, b, and c are single-digit positive integers. The input line will have exactly 9 characters, formatted exactly as shown, with a single space separating each number and arithmetic operator.
출력 형식
Print, on a single line, YES if the sum is correct; otherwise, print NO.
예제 입력 1
1 + 2 = 3
예제 출력 1
YES
예제 입력 2
2 + 2 = 5
예제 출력 2
NO
Comments