fork(2) download
  1. import sys
  2.  
  3. def round50(n):
  4. return round(n * 2, -2) // 2
  5.  
  6. for n in map(int, sys.stdin):
  7. print("{} -> {}".format(n, round50(n)))
  8.  
Success #stdin #stdout 0.04s 9620KB
stdin
478
472
stdout
478 -> 500
472 -> 450