Editorial for DMOPC '17 Contest 3 P0 - 2-Satisfiability


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: Kirito

Most programming languages are capable of displaying formatted output using format strings. However, should your language not support format strings, then you should use a better language can implement the following pseudocode:

B ← input()
ans ← floor(B/2)

print '$'
print ans
if B is even:
    print '.00'
else:
    print '.50'
print ' '
print '$'
print ans
if B is even:
    print '.00'
else:
    print '.50'

Comments

There are no comments at the moment.