1 solutions
-
0
C++ :
#include<cstdio> #include<cstring> using namespace std; int total=0; int zhao(int a,int b) { int shi=100/10; int wu=100/5; int er=100/2; int yi=100/1; int zhong=100*a; for(int x=1;x<=shi;++x) for(int j=1;j<=wu;++j) for(int z=1;z<=er;++z) for(int y=1;y<=yi;++y) if(10*x+5*j+2*z+1*y==zhong&&x+j+z+y==b) ++total; } int main() { int n,m; scanf("%d%d",&n,&m); zhao(n,m); if(total!=0) printf("%d",total); else printf("No"); return 0; }
- 1
Information
- ID
- 17355
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By