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