Logo
(追記) (追記ここまで)

10698번 - Ahmed Aly 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB13631091101481.577%

문제

Ahmed Aly was the chief judge for the last Arab Collegiate Programming Contest, and he will be the chief judge for the next one also. He was an ACM ICPC world finalist in Oralndo 2011, and currently he is a software engineer at Google.

During the last ACPC contest, it was the first time that the chief judge didn’t not attend the contest, and this was because his son Omar was expected to be born a few days before or after the contest (he was born 10 days after the contest), so he could not travel to Jordan.

Now his son Omar is old enough (9 months old) to start learning programming. His first program was very simple, just a program to add or subtract two numbers, and he needs your help to check if his program is correct or not.

입력

Your program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 100). Followed by T lines, each test case is a single line containing an equation in the following format “X O Y = Z”, where X, Y and Z are positive integers (1 ≤ X,Y,Z ≤ 100) and O is either ‘+’ or ‘-’ (without the quotes).

출력

For each test case print a single line containing “Case n:” (without the quotes) where n is the test case number (starting from 1) followed by a space then “YES” (without the quotes) if the equation is correct or “NO” (without the quotes) if the equation is wrong.

제한

예제 입력 1

4
1 +たす 23 = 22
1 +たす 22 = 23
22 -ひく 1 = 23
23 -ひく 1 = 22

예제 출력 1

Case 1: NO
Case 2: YES
Case 3: NO
Case 4: YES

힌트

출처

ICPC > Regionals > Africa and Arab > Arab Collegiate Programming Contest > Tunisian Collegiate Programming Contest > TCPC 2013 J번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /