Under construction

Still being built. Things may change

Eloquent Evaluator

Time limit1sMemory limit512 MB

Summary
Checks whether a printed expression like a+b=c is well formatted and correct, and suggests a fix if changing at most two characters can repair it.
Level

Medium4 of 10

Topics
String, Brute force, Implementation
Solved
No attempts yet

Problem

In a small cabin in a meadow, where Kostadin Stefanović grills dishes from old recipes of the Leskovac masters, Matej and Mr. Malnar are having a meal. This time Matej called the meeting. The topic is a new evaluation system, because the old one has been overtaken by time.

Mr. Malnar agrees with everything and adds: "...and the evaluator has to be more eloquent."

"More eloquent? What do you mean, more eloquent?! Are you sure these are porcini?" Matej replies.

Mr. Malnar explains that he is tired of seeing the same messages again and again, such as Točno!, Prekoračeno vremensko ograničenje!, or Pogreška pri kompilaciji!. Evaluators should adapt to the task and sometimes comment on the output of the contestant's program, because the future belongs to artificial intelligence. Your job is to help Matej build a prototype of such an evaluator.

The contestant must print one line containing a mathematical expression of the form <broj><operacija><broj>=<broj>. Here <broj> is any positive integer at most 10910^9 without leading zeros, and <operacija> is one of +, -, *, or /. An expression with these properties is well formatted.

The eloquent evaluator prints one of the following messages:

  • Tocno: the printed expression is mathematically correct and well formatted.
  • Izraz nije ispravno formatiran: the printed expression does not match the required format.
  • Netocno, umjesto <izraz1> mogli ste ispisati <izraz2>: the printed expression (<izraz1>) is well formatted but mathematically wrong, and changing at most two characters produces an expression (<izraz2>) that is both correctly formatted and mathematically correct.
  • Potpuno netocno: the printed expression is well formatted and mathematically wrong, and it cannot be fixed by changing at most two characters.

Input

The first line contains one word of at most 30 characters, which is the contestant's answer from the problem statement. The word consists only of decimal digits (0, 1, ..., 9), the arithmetic operators (+, -, *, /), and the equals sign (=).

Output

Print one line containing the matching message from the eloquent evaluator.

Examples2

  1. Example 1

    Input
    1++1=2
    
    Expected output
    Izraz nije ispravno formatiran
    
  2. Example 2

    Input
    2+3=6
    
    Expected output
    Netocno, umjesto 2+3=6 mogli ste ispisati 3+3=6