Submission #3810589
Source Code Expand
#include<cstdio> using namespace std; int main(){ int a,b,c,x; cin>>a>>b>>c>>x; int ans=0; for(int i=0;i<=a;i++){ for(int j=0;j<=a;i++){ for(int m=0;m<=a;i++){ int c=i*500+j*100+m*50; if(x==c) ans++; } } } cout<<ans<<endl; }
Submission Info
Submission Time | |
---|---|
Task | B - Coins |
User | Yuuki0418 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 302 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:5:3: error: ‘cin’ was not declared in this scope cin>>a>>b>>c>>x; ^ ./Main.cpp:16:3: error: ‘cout’ was not declared in this scope cout<<ans<<endl; ^ ./Main.cpp:16:14: error: ‘endl’ was not declared in this scope cout<<ans<<endl; ^