Submeter | Todas submissőes | Melhores | Voltar |
Problem hidden
MMFTEAM - Team formation |
Coach has n players. A team is a subset of players and has at least two players - a captain and a keeper. How many ways can a coach form a team from n players?
Input
Each line of input contains one random integer number 2 ≤ n ≤ 106 (1 000 000). Input terminates with 0 (zero).
Output
For each n print your answer modulo 1 000 000 007 on new line.
Example
Input: 2 3 0 Output: 2 12
22/06/2019 - Time limit increased.
Adicionado por: | julkas |
Data: | 2018-07-03 |
Tempo limite: | 4s |
Tamanho do fonte: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Linguagem permitida: | Todas exceto: ASM64 CLOJURE ERL FSHARP PERL6 PY_NBC SCALA TCL |