COCI '07 Contest 5 #1 Tri

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 32M

Problem types

Little Mirko wrote into his math notebook an equation containing three positive integers, the equals sign and one of the four basic arithmetic operations (addition, subtraction, multiplication and division).

During another class, his friend Slavko erased the equals sign and the operations from Mirko's notebook.

Help Mirko by reconstructing the equation from the three integers.

Input Specification

The first line of input contains three integers less than 100, separated by spaces.

Note: The input data will guarantee that a solution, although not necessarily unique, will always exist.

Output Specification

On a single line, output a valid equation containing the three integers (in the same order), an equals sign and one of the four operations. If there are multiple solutions, output any of them.

Sample Input 1

5 3 8

Sample Output 1


Sample Input 2

5 15 3

Sample Output 2



  • -2
    ZEN  commented on Dec. 26, 2017, 11:52 p.m.

    "output any of them" meaning any one or all?

    • -2
      jkguipqnjcy49979693  commented on Dec. 26, 2017, 11:57 p.m.

      any one

      • -2
        ZEN  commented on Dec. 27, 2017, 12:09 a.m.

        thanks had to submit a few times to figure out lol

  • -3
    WzRd  commented on Dec. 24, 2017, 8:18 p.m.

    WzRd Never mind kek

  • -2
    WzRd  commented on Dec. 24, 2017, 5:55 p.m.

    There is no judge for this problem :(

  • -2
    khysarth  commented on Sept. 25, 2017, 2:19 p.m. edited