bzoj#P2486. Super Poker
Super Poker
题目描述
I have a set of super poker cards,consisting of an infinite number of cards.For each positive integer ,there are exactly four cards whose value is :Spade(),Heart(),Club() and Diamond().There are no cards of other values.
Given two positive integers and ,how many ways can you pick up at most cards whose values sum to ?For example,if and ,ne way is ,shown below:
输入格式
There will be at most test cases,each with two integers and .The input is terminated by .
输出格式
For each test case,print the number of ways,modulo .
2 1
2 2
2 3
50 5
0 0
4
10
10
1823966
数据规模与约定
的数据满足:。
提示
湖南省第七届大学生程序设计大赛
题目来源
鸣谢刘汝佳先生授权使用