Problem

3 /4


Arrow match

Problem

The program receives two integers n, m, each in a separate line \(0<n<=12, 0< =m<60\) , indicating a point in time "n hours m minutes". Determine the smallest number of full minutes that must elapse before the hour and minute hands on the dial coincide, not necessarily at some division. Do not use real arithmetic.

The task must be solved without using conditional operators (including without the ternary operator ?: in C++) and/or loops. In addition, you cannot use comparison operations and the logical (boolean) data type.

Examples
# Input Output
1 2
50
26
2 3
0
16