Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class JF_Spice_Flow {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int yield = Integer.parseInt(scanner.nextLine());
- int pureLeft = 0;
- int daysWorked = 0;
- boolean isFinished = false;
- while (yield >= 100) {
- isFinished = true;
- pureLeft += yield - 26;
- yield -= 10;
- daysWorked++;
- }
- if (isFinished) {
- pureLeft -= 26;
- System.out.println(daysWorked);
- System.out.println(String.format("%d", pureLeft));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement