Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Project: Complex_Conditions - created by borkins on 2017-03-27.
- */
- import java.util.Scanner;
- public class _12_Volleyball
- {
- public static void main(String[] args)
- {
- Scanner console = new Scanner(System.in);
- String yearType = console.nextLine();
- int holidays = Integer.parseInt(console.nextLine());
- int daysHome = Integer.parseInt(console.nextLine());
- double playCount = daysHome + ((48 - daysHome) * 3d / 4) + (holidays * 2d / 3);
- if (yearType.equals("leap")) {
- playCount += playCount * 0.15;
- }
- System.out.println((int) playCount);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment