Submit | All submissions | Best solutions | Back to list |
LTOADD - Learn to Add |
It was Fatota's first day at school where he learned how to add two numbers together. The teacher wrote the addition equations on the blackboard like “2+2=4”. Fatota is very excited about the topic and he couldn't wait to tell his elder brother about what he learned in school that day.
When Fatota went back home, he couldn't remember neither how to write the addition equation he learned earlier nor which numbers was on the right hand side and which was on the left, but he could only remember the numbers in the equation like “2, 4 and 2”. However, not all the numbers in all the equation he remembered were correct. He thought that may be 1, 7 and 9 could be a valid numbers in an addition equation. He is not wishing to be embarrassed in front of his elder brother, so he asked for your help to tell him if the three numbers he chooses are valid numbers in the addition equation?
Input
The input starts with an integer T, which is the number of test cases followed by T lines. Each line contain three Integers A, B and C such that (0 < A, B, C < 100)
Output
For each test case output a single line “OK”, If the sum of two numbers is equal to the third number, otherwise print “NOK”.
Example
Input: 3 1 2 3 2 3 4 2 4 2 Output: OK NOK OK
Added by: | Mohamed Ali |
Date: | 2013-10-29 |
Time limit: | 0.100s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
Resource: | 11th Egyptian Collegiate Programming Contest |