300545: CF104A. Blackjack
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Blackjack
题意翻译
Blackjack是一个扑克牌游戏。 Blackjack使用除了两张王以外的全部52张卡牌,也就是$2,3,4,5,6,7,8,9,10,J,Q,K,A$。其中规定$2,3,4,5,6,7,8,9,10$的点数为$2,3,4,5,6,7,8,9,10$,$J,Q,K$的点数均为$10$,$A$的点数同时为$1$或$11$,这取决于玩家的意愿。虽然扑克牌有花色,但是一张卡牌的点数与其花色无关。这个游戏的规则很简单:拿两张牌,如果这两张牌的点数之和等于$n$,玩家就赢了,否则玩家就输了。 现在玩家已经拿了一张黑桃$Q$,求在其他牌中再抽一张,能使玩家赢得游戏的方案数。 输入格式 一个整数$n(1<=n<=25)$,表示要求的点数。 输出格式 一个整数,表示能使玩家赢得游戏的方案数。题目描述
One rainy gloomy evening when all modules hid in the nearby cafes to drink hot energetic cocktails, the Hexadecimal virus decided to fly over the Mainframe to look for a Great Idea. And she has found one! Why not make her own Codeforces, with blackjack and other really cool stuff? Many people will surely be willing to visit this splendid shrine of high culture. In Mainframe a standard pack of $ 52 $ cards is used to play blackjack. The pack contains cards of $ 13 $ values: $ 2 $ , $ 3 $ , $ 4 $ , $ 5 $ , $ 6 $ , $ 7 $ , $ 8 $ , $ 9 $ , $ 10 $ , jacks, queens, kings and aces. Each value also exists in one of four suits: hearts, diamonds, clubs and spades. Also, each card earns some value in points assigned to it: cards with value from two to ten earn from $ 2 $ to $ 10 $ points, correspondingly. An ace can either earn $ 1 $ or $ 11 $ , whatever the player wishes. The picture cards (king, queen and jack) earn $ 10 $ points. The number of points a card earns does not depend on the suit. The rules of the game are very simple. The player gets two cards, if the sum of points of those cards equals $ n $ , then the player wins, otherwise the player loses. The player has already got the first card, it's the queen of spades. To evaluate chances for victory, you should determine how many ways there are to get the second card so that the sum of points exactly equals $ n $ .输入输出格式
输入格式
The only line contains $ n $ ( $ 1<=n<=25 $ ) — the required sum of points.
输出格式
Print the numbers of ways to get the second card in the required way if the first card is the queen of spades.
输入输出样例
输入样例 #1
12
输出样例 #1
4
输入样例 #2
20
输出样例 #2
15
输入样例 #3
10
输出样例 #3
0