2012 Canadian Computing Competition, Stage 1
Problem S1: Don't pass me the ball!
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 ascending 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.
The input will be the positive integer J (J ≤ 99), which is the jersey number of the goal scorer.
The output will be one line containing the number of possible scoring combinations that could have J as the goal-scoring jersey number.
Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Feb 29, 2012
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, TEXT, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
It works fine on Ready to Program and Eclipse, but not this