mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1726.c
This commit is contained in:
parent
e18fa3cbda
commit
708ac844d4
28
QUSTOJ/1726.c
Normal file
28
QUSTOJ/1726.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int cnt=0;
|
||||
int cash;
|
||||
scanf("%d",&cash);
|
||||
int amax=cash/5;
|
||||
int bmax=cash/2;
|
||||
int cmax=cash;
|
||||
for(int a=1;a<=amax;a++)
|
||||
{
|
||||
for(int b=1;b<=bmax;b++)
|
||||
{
|
||||
for(int c=1;c<=cmax;c++)
|
||||
{
|
||||
if(5*a+2*b+c==cash)
|
||||
{
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("%d\n",cnt);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user