题意:
给定n种面值的硬币面值分别为WiW_{i}Wi个数为CiC_{i}Ci,问用这些硬币可以组成1~m之间的多少面值。
题目:
People in Silverland use coins.They have coins of value A1,A2,A3…An Silverland dollar.One day Tony opened his m…
题意:
给你两个数,p和a;满足两个条件: 1.p不是素数; 2.apa^{p}ap %pa; 满足则输出yes,反之输出no。
题目:
Fermat’s theorem states that for any prime number p and for any integer a &g…
题意:
给20个水碗。朝上为‘0’或朝下为‘1’,每次操作使三个碗翻转,问使所有20个水碗都朝上,至少翻多少次?
题目:
The cows have a line of 20 water bowls from which they drink. The bowls can be e…
题意:
给你n个居民的起始位置,各自在长度为l的平台,以同样的速度向左或向右走,当碰见时往相反方向走,问最后掉下去的居民花费的时间以及姓名。
题目:
The Disc, being flat, has no real horizon. Any a…