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