CCC '12 S1 - Don't pass me the ball!

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 256M

Problem type
Canadian Computing Competition: 2012 Stage 1, Senior #1

A CCC soccer game operates under slightly different soccer rules. A goal is only counted if the 4 players, in order, who touched the ball prior to the goal have jersey numbers that are in strictly increasing numeric order with the highest number being the goal scorer.

Players have jerseys numbered from 1 to 99 (and each jersey number is worn by exactly one player).

Given a jersey number of the goal scorer, indicate how many possible combinations of players can produce a valid goal.

Input Specification

The input will be the positive integer J (1 \le J \le 99), which is the jersey number of the goal scorer.

Output Specification

The output will be one line containing the number of possible scoring combinations that could have J as the goal scoring jersey number.

Sample Input 1

4

Output for Sample Input 1

1

Sample Input 2

2

Output for Sample Input 2

0

Sample Input 3

90

Output for Sample Input 3

113564

Comments


  • -1
    Risikiwi  commented on March 22, 2023, 3:15 p.m.

    If increasing numeric order, does it mean that it doesn't have to be in arithmetic order?

    Such as, does {1 3 4 8} apply?


  • 5
    jerrycui07  commented on Jan. 11, 2023, 4:35 a.m.

    As someone who didn't know the math needed for this problem, it took me longer to solve than the S5 of this contest.


    • 1
      TianrunZhang  commented on Jan. 15, 2023, 10:40 p.m.

      I'm pretty concerned about the upcoming contest...... If the question takes 30 minutes for me to read or it involves maths like this, I'm basically screwed.


  • -12
    bobbyflip332  commented on Jan. 27, 2021, 3:38 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • 13
    tappbros  commented on Oct. 2, 2020, 10:30 p.m.

    These CCC soccer game rules suck. If one of your players are sick, no way to score a goal.


    • 46
      Dav_Did  commented on Jan. 22, 2021, 5:44 a.m.

      If one of your player is sick, the whole stadium will be tested for COVID