Merge pull request #1 from KiritoTRw/master

QUST OJ 1450 Added.
This commit is contained in:
Kirigaya Kazuto 2016-04-20 07:52:24 +08:00
commit f780f0003e
2 changed files with 28 additions and 1 deletions

27
QUSTOJ/1450.cpp Normal file
View File

@ -0,0 +1,27 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
int main()
{
int inc;
int five,two,one;
int five_max,two_max,one_max;
int ans=0;
scanf("%d",&inc);
five_max=inc/5;
two_max=inc/2;
one_max=inc;
for(five=1;five<=five_max;five++)
{
for(two=1;two<=two_max;two++)
{
for(one=1;one<=one_max;one++)
{
if(5*five+2*two+one==inc) ans++;
}
}
}
printf("%d\n",ans);
return 0;
}

View File

@ -1,3 +1,3 @@
#青岛科技大学 QUSTOJ
[Goto QUSTOJ](http://acm.qust.edu.cn/problemset.php "QUSTOJ")
[Goto QUSTOJ Problem Set](http://acm.qust.edu.cn/problemset.php "QUSTOJ Problem Set")
![image](/QUSTOJ/qust.jpg)