Hello, there is a question on one problem. Maybe someone can help solve?
Problem: given three integers
A, B, C
Determine whether there is at least one even and at least one odd among them. NumbersA, B, C
, not exceeding modulo 10,000. The format of the output. One line - "YES" or "NO".
program Main; var a, b, c: longint; begin readln(a, b, c); if (a < abs(10000)) or (b < abs(10000)) or (c < abs(10000)) then begin if (not odd(a) or not odd(b) or not odd(c)) then writeln('YES') else if odd(a) or odd(b) or odd(c) then writeln('NO') end else writeln('input error!') end.
That's what happened for me so far, the decision was partially correct in the end (according to the test system) :(
Oh yeah, there is another task that I don’t understand how to solve at all:
Given the number X. Required to translate this number in the Roman number system. Input file format: Given the number X in decimal notation (1 ≤ X ≤ 100). Output file format: Output X in the Roman numeral system.
It’s not necessary to write the decision completely, I basically imagine how to solve it (probably with the help of the case
), but bad luck, I don’t know Roman numerals at all :(
X <= 10000
. That's wrong. - karmadro4