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

View as PDF

Submit solution

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

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
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


Output for Sample Input 1


Sample Input 2


Output for Sample Input 2


Sample Input 3


Output for Sample Input 3



  • 0
    bobbyflip332  commented on Jan. 26, 2021, 10:38 p.m.

    tetrahedral number moment

  • 5
    tappbros  commented on Oct. 2, 2020, 6:30 p.m.

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

    • 2
      Dav_Did  commented on Jan. 22, 2021, 12:44 a.m.

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

  • -12
    CringeAnimal  commented on July 9, 2020, 2:20 a.m. edited

    This comment is hidden due to too much negative feedback. Click here to view it.

    • -12
      BULLET999  commented on Aug. 10, 2020, 4:49 p.m.

      This comment is hidden due to too much negative feedback. Click here to view it.