Advertisement
markopizzy

Untitled

Jan 24th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class JF_Spice_Flow {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int yield = Integer.parseInt(scanner.nextLine());
  8. int pureLeft = 0;
  9. int daysWorked = 0;
  10.  
  11. while (yield >= 100) {
  12. pureLeft += yield - 26;
  13. yield -= 10;
  14. daysWorked++;
  15. }
  16. pureLeft -= 26;
  17. System.out.println(daysWorked);
  18. System.out.println(String.format("%d", pureLeft));
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement