Submission #7019512
Source Code Expand
#include<iostream> using namespace std; int main(){ int N,Y; cin>>N>>Y; int a,b,c; for(a=0;a<=N;a++){ for(b=0;b<=N;b++){ c=N-a-b; if(a+b+c<=N && a*10000+b*5000+c*1000==Y){ cout<<a<<' '<<b<<' '<<c<<endl; return 0; } } } } cout<<"-1 -1 -1"<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Otoshidama |
User | fidia |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 368 Byte |
Status | CE |
Compile Error
./Main.cpp:18:5: error: ‘cout’ does not name a type cout<<"-1 -1 -1"<<endl; ^ ./Main.cpp:19:5: error: expected unqualified-id before ‘return’ return 0; ^ ./Main.cpp:20:2: error: expected declaration before ‘}’ token } ^