uva 621 - Secret Research
At a certain laboratory results of secret research are thoroughly encrypted. A result of a single experiment is stored as an information of its completion:
`positive result', `negative result', `experiment failed' or `experiment not completed'
The encrypted result constitutes a string of digits S, which may take one of the following forms:
positive result S = 1 or S = 4 or S = 78
negative result S = S35
experiment failed S = 9S4
experiment not completed S = 190S
(A sample result S35 means that if we add digits 35 from the right hand side to a digit sequence then we shall get the digit sequence corresponding to a failed experiment)
You are to write a program which decrypts given sequences of digits.
Input
A integer n stating the number of encrypted results and then consecutive n lines, each containing a sequence of digits given as ASCII strings.
Output
For each analysed sequence of digits the following lines should be sent to output (in separate lines):
+ for a positive result
- for a negative result
* for a failed experiment
? for a not completed experiment
In case the analysed string does not determine the experiment result, a first match from the above list should be outputted.
Sample Input
4
78
7835
19078
944
Sample Output
+
-
?
*
한참을 보고 나서야 s는 임의의 문자열을 대표한다
#include
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Access Request, Session and Application in Struts2If we want to use request, Session and application in JSP, what should we do? We can obtain Map type objects such as Req...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.