Submission #3601335
Source Code Expand
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main(){ ll n,y; cin>>n>>y; for(int i=0;i<=n;i++){ for(int j=0;j<=n;j++){ int k=n-i-j; if(k>=0){ if(i*10000+j*5000+k*1000==y){ cout << i<" "<<j<<" "<<k<<endl; } } } } cout << "-1 -1 -1"<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Otoshidama |
User | shinchan |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 334 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:14:21: error: invalid operands of types ‘const char [2]’ and ‘int’ to binary ‘operator<<’ cout << i<" "<<j<<" "<<k<<endl; ^