游客 Signup | Login
中文 | En

2383 - 【入门】兑换硬币

用一张一元票换1分、2分和5分的硬币,每种至少一枚, 问有几种换法.

Input

Output

输出只有一行(这意味着末尾有一个回车符号),包括1个整数。

Examples

Input

no input needed

Output

461

Solution C++

#include <iostream>
using namespace std;

int main()
{
    int cnt=0;
    for(int i=1;i<=100;i++)
    {
    	for(int j=1;j<=50;j++)
    	{
    		for(int k=1;k<=20;k++)
    		{
    			if(i+j*2+k*5==100)cnt++;
			}
		}
	}
	cout<<cnt;
    return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题