fork download
  1. import java.util.*;
  2.  
  3. class Task2
  4. {
  5. public static void main (String[] args)
  6. {
  7. int N;
  8. Scanner in = new Scanner(System.in);
  9. N = in.nextInt();
  10. if (N % 100 >= 65)
  11. N = 100 * (N / 100 + 1);
  12. if (N % 20 > 15)
  13. N = 20 * (N / 20 + 1);
  14. System.out.println((N / 100) * 100 + (N % 100 / 20) * 30 + 2 * (N % 20));
  15. }
  16. }
Success #stdin #stdout 0.07s 4386816KB
stdin
238
stdout
260