Advertisement
mr1302

Untitled

Nov 12th, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. import java.io.PrintWriter;
  2.  
  3. import java.util.Scanner;
  4.  
  5.  
  6. public class ojm1 {
  7.  
  8. static Scanner in = new Scanner(System.in);
  9. static PrintWriter out = new PrintWriter(System.out, true);
  10.  
  11. public static void main(String[] args) {
  12.  
  13. int x = in.nextInt();
  14. int y = in.nextInt();
  15. int a;
  16. int s = 0;
  17.  
  18. a = 1605 - x;
  19.  
  20. if (a == 0) {
  21. s = (y - x) / 10;
  22. out.println(s);
  23. }
  24. if (a < 0) {
  25. if (a % 5 == 0) {
  26. s = (y - x) / 10;
  27. } else {
  28. s = (y - x) / 10 + 1;
  29. }
  30. out.println(s);
  31. }
  32. if (a > 0) {
  33. if (y < 1605) {
  34. s = 0;
  35.  
  36. } else {
  37. s = (y - 1605) / 10 + 1;
  38.  
  39. }
  40. out.println(s);
  41. }
  42.  
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement