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