Advertisement
DidiHristova93

Untitled

Oct 9th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class techModuleSpiceMustFLow {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int yield = Integer.parseInt(scanner.nextLine());
  8. int consume = 0;
  9. int yieldDrops = 0;
  10.  
  11. while (yield >= 100) {
  12. yieldDrops++;
  13. consume += yield;
  14. yield -= 10;
  15. consume -= 26;
  16. }
  17. consume -= 26;
  18. if (consume < 0)
  19. consume = 0;
  20.  
  21.  
  22. System.out.println(yieldDrops);
  23. System.out.println(consume);
  24.  
  25.  
  26.  
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement