Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // http://judge.softuni.bg/Contests/2/CSharp-Basics-Exam-10-April-2014-Morning
- import java.util.Scanner;
- public class JoroTheFootballPlayer {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- char isLeap = input.findInLine(".").charAt(0);
- int holidayCount = input.nextInt();
- int weekendsHomeCount = input.nextInt();
- int totalWeekendsInYear = 52;
- int normalWeekends = totalWeekendsInYear - weekendsHomeCount;
- double gamesCount = normalWeekends * 2d / 3d + weekendsHomeCount * 1d + holidayCount / 2d;
- if (isLeap == 't') {
- gamesCount += 3;
- }
- System.out.print((int)gamesCount);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement