Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class _1_JoroTheFootballPlayer {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner scan = new Scanner(System.in);
- char year = scan.next().charAt(0);
- int holidays = scan.nextInt();
- int hometownWeekends = scan.nextInt();
- int allWeekends = 52;
- int normalWeekends = allWeekends - hometownWeekends;
- double playTimes = (double) normalWeekends * 2 / 3;
- playTimes += hometownWeekends;
- playTimes += (double) holidays / 2;
- if (year == 't') {
- playTimes += 3;
- }
- int totalPlayTimes = (int) playTimes;
- System.out.println(totalPlayTimes);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement