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