submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s205961144 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
int total==c1+c5+c10+c50+c100+c500;
if(total>=1000){
cout << 1<< endl;
}else{
cout << 0 << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:12: error: expected initializer before '==' token
7 | int total==c1+c5+c10+c50+c100+c500;
| ^~
a.cc:9:6: error: 'total' was not declared in this scope
9 | if(total>=1000){
| ^~~~~
|
s532783451 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
int total=c1+c5+c10+c50+c100+c500;
if(total>=1000){
cout << 1<< endl;
}if else(total<=1000){
cout << 0 << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:7: error: expected '(' before 'else'
11 | }if else(total<=1000){
| ^~~~
| (
|
s705034940 | p00291 | C++ | #include<iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
int total = c1 + c5*5 + c10*10 + c50*50 + c100*100 + c500*500;
cout << (total>=1000) ? 1:0 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:37: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << (total>=1000) ? 1:0 << endl;
| ~~^~~~~~~
|
s548999860 | p00291 | C++ | #include<iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
int m;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
m=c1*1+c5*5+c10*10+c50*50+c100*100+c500*500;
if(m>=1000){
cout<<"1"<<endl;
}else cout<<"0"<<endel;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:36: error: 'endel' was not declared in this scope
11 | }else cout<<"0"<<endel;
| ^~~~~
|
s220007056 | p00291 | C++ | #include<iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
int m;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
m=c1*1+c5*5+c10*10+c50*50+c100*100+c500*500;
if(m>=1000){
cout<<"1"<<endl;
}else{
cout<<"0"<<endel;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:28: error: 'endel' was not declared in this scope
12 | cout<<"0"<<endel;
| ^~~~~
|
s885793793 | p00291 | C++ | #include<iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
int m;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
m=(c1*1)+(c5*5)+(c10*10)+(c50*50)+(c100*100)+(c500*500);
if(m>=1000){
cout<<"1"<<endl;
}else{
cout<<"0"<<endel;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:28: error: 'endel' was not declared in this scope
12 | cout<<"0"<<endel;
| ^~~~~
|
s078767357 | p00291 | C++ | #include<iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500,x;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
x=c1+(5*c5)+(10*c10)+(50*c50)+(100*c100)+(500*)c500;
if(x>=1000) cout<<1<<endl;
else cout<<0<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:55: error: expected primary-expression before ')' token
9 | x=c1+(5*c5)+(10*c10)+(50*c50)+(100*c100)+(500*)c500;
| ^
|
s151416965 | p00291 | C++ | #include<iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500,co;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
co=c1+c5+c10+c50+c100+c500;
if(co>=1000){
cout>>"1">>endl;
}else{
}cout>>"0">>endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:21: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
9 | cout>>"1">>endl;
| ~~~~^~~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout>>"1">>endl;
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout>>"1">>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout>>"1">>endl;
| ^~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout>>"1">>endl;
| ^~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout>>"1">>endl;
| ^~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout>>"1">>endl;
| ^~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout>>"1">>endl;
| ^~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout>>"1">>endl;
| ^~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[2]]':
a.cc:9:9: required from here
9 | cout>>"1">>endl;
| ^~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:11:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
11 | }cout>>"0">>endl;
| ~~~~^~~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | }cout>>"0">>endl;
| ^~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:11:18: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
11 | }cout>>"0">>endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | }cout>>"0">>endl;
| ^~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | }cout>>"0">>endl;
| ^~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | }cout>>"0">>endl;
| ^~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | }cout>>"0">>endl;
| ^~~
/usr/include/c++/14/is |
s901514179 | p00291 | C++ | #include<iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500,co;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
co=c1+c5+c10+c50+c100+c500;
if(co>=1000){
cout<<"1"<<endl;
}else{
}cout<<"0"<<endl;
}
return 0;
} | a.cc:13:1: error: expected unqualified-id before 'return'
13 | return 0;
| ^~~~~~
a.cc:14:1: error: expected declaration before '}' token
14 | }
| ^
|
s908799243 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int c[]={1,5,10,50,100,500};
int n=0,m;
for(int i=0;i<6;i++){
cin>>m;
n=m*c[i];
if(n>1000){
cout<<1<<endl;
}
}else{
cout<<0<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:2: error: 'else' without a previous 'if'
13 | }else{
| ^~~~
|
s964899931 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
if(c1*1+c5*5+c10*10+c50*50+c100*100+c500*500>=1000){
cout<<"1"<<endl;
}
else{
cout<<"0"<<endl;
}
return 0; | a.cc: In function 'int main()':
a.cc:12:18: error: expected '}' at end of input
12 | return 0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s356347535 | p00291 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
using namespace std;
#define fst first
#define scd second
#define PB push_back
#define MP make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define omajinai ios::sync_with_stdio(false);cin.tie(0)
#define rep(i,x) for(int i=0;i<(int)(x);++i)
#define rep1(i,x) for(int i=1;i<=(int)(x);++i)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
template<typename T>T& max(T&a,T&b){if(a>=b)return a;return b;}
template<typename T>T& min(T&a,T&b){if(a<b)return a;return b;}
template<typename T>bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<typename T>bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<typename T>T get(){T a;cin>>a;return a;}
template<typename T>T rev(T a){reverse(all(a));return a;}
template<typename T>vector<T>&sort(vector<T>&a){sort(all(a));return a;}
const int inf = 1e9;
const ll linf = 3e18;
const double eps = 1e-9;
signed main()
{
int a[5];
int s = 0;
rep(i, 5) cin >> a[i], s += a[i];
cout << (a >= 1000) << endl;
} | a.cc: In function 'int main()':
a.cc:55:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
55 | cout << (a >= 1000) << endl;
| ~~^~~~~~~
|
s075276984 | p00291 | C++ | #include<stdio.h>
int main(void)
{
int c1,c5,c10,c50,c100,c500,sum;
scanf("%d %d %d %d %d %d",&c1,&c5,&c10,&c50,&c100,&c500);
sum=c1*1+c5*5+c10*10+c50*50+c100*100+c500*500;
if("1000<sum"){
printf("1\n");
}
else if{
printf("0\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:16: error: expected '(' before '{' token
10 | else if{
| ^
| (
|
s816903014 | p00291 | C++ | #include<stdio.h>
int main(void)
{
int c1,c5,c10,c50,c100,c500,sum;
scanf("%d %d %d %d %d %d",&c1,&c5,&c10,&c50,&c100,&c500);
sum=c1*1+c5*5+c10*10+c50*50+c100*100+c500*500;
if("1000<sum"){
printf("1\n");
}
else("1000>sum"){
printf("0\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before '{' token
10 | else("1000>sum"){
| ^
| ;
|
s265212891 | p00291 | C++ | #include <bits/stdc++.h>
using namespace std;
int c1,c5,c10,c50,c100,c500;
int all = 0;
int main() {
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
all = c1*1+c5*5+c10*10+c50*50+c100*100+c500*500
if( all => 1000) {
cout << 1 << endl;
}else {
cout << 0 << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:50: error: expected ';' before 'if'
9 | all = c1*1+c5*5+c10*10+c50*50+c100*100+c500*500
| ^
| ;
10 | if( all => 1000) {
| ~~
a.cc:12:4: error: 'else' without a previous 'if'
12 | }else {
| ^~~~
|
s464537986 | p00291 | C++ | #include <bits/stdc++.h>
using namespace std;
int c1,c5,c10,c50,c100,c500;
int all = 0;
int main() {
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
all = c1*1+c5*5+c10*10+c50*50+c100*100+c500*500;
if( all => 1000) {
cout << 1 << endl;
}else {
cout << 0 << endl;
}
} | a.cc: In function 'int main()':
a.cc:10:12: error: expected primary-expression before '>' token
10 | if( all => 1000) {
| ^
|
s395459295 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
cin >> a >> b >> c >> d >> e >> f;
a = a + b*5 + c*10 + d*50 + e*100 + f*500;
if(a >= 1000)
cout >> 1 >> endl;
else
cout >> 0 >> endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
9 | cout >> 1 >> endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:9:10: note: candidate: 'operator>>(int, int)' (built-in)
9 | cout >> 1 >> endl;
| ~~~~~^~~~
a.cc:9:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> 1 >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> 1 >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:9:13: required from here
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:11:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
11 | cout >> 0 >> endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:11:10: note: candidate: 'operator>>(int, int)' (built-in)
11 | cout >> 0 >> endl;
| ~~~~~^~~~
a.cc:11:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:11:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
11 | cout >> 0 >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Tra |
s364832631 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
cin >> a >> b >> c >> d >> e >> f;
a = a + b*5 + c*10 + d*50 + e*100 + f*500;
if(a >= 1000){
cout >> 1 >> endl;
} else {
cout >> 0 >> endl;
}
return 0;
}
} | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
9 | cout >> 1 >> endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:9:10: note: candidate: 'operator>>(int, int)' (built-in)
9 | cout >> 1 >> endl;
| ~~~~~^~~~
a.cc:9:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> 1 >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> 1 >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:9:13: required from here
9 | cout >> 1 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:11:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
11 | cout >> 0 >> endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:11:10: note: candidate: 'operator>>(int, int)' (built-in)
11 | cout >> 0 >> endl;
| ~~~~~^~~~
a.cc:11:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:11:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
11 | cout >> 0 >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> 0 >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Tra |
s827152980 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
cin >> a >> b >> c >> d >> e >> f;
a = a + b*5 + c*10 + d*50 + e*100 + f*500;
if(a >= 1000){
cout >> '1' >> endl;
} else {
cout >> '0' >> endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char')
9 | cout >> '1' >> endl;
| ~~~~ ^~ ~~~
| | |
| | char
| std::ostream {aka std::basic_ostream<char>}
a.cc:9:10: note: candidate: 'operator>>(int, int)' (built-in)
9 | cout >> '1' >> endl;
| ~~~~~^~~~~~
a.cc:9:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> '1' >> endl;
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> '1' >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> '1' >> endl;
| ^~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> '1' >> endl;
| ^~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> '1' >> endl;
| ^~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> '1' >> endl;
| ^~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> '1' >> endl;
| ^~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> '1' >> endl;
| ^~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = char]':
a.cc:9:13: required from here
9 | cout >> '1' >> endl;
| ^~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:11:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char')
11 | cout >> '0' >> endl;
| ~~~~ ^~ ~~~
| | |
| | char
| std::ostream {aka std::basic_ostream<char>}
a.cc:11:10: note: candidate: 'operator>>(int, int)' (built-in)
11 | cout >> '0' >> endl;
| ~~~~~^~~~~~
a.cc:11:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> '0' >> endl;
| ^~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:11:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
11 | cout >> '0' >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> '0' >> endl;
| ^~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout >> '0' >> endl;
| ^~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout >> '0' >> endl;
| ^~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:11:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> '0' >> endl;
| |
s796571587 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
int money=0;
money=c1+(c5*5)+(c10*10)+(c50*50)+(c100*100)+(c500*500);
if(money>=1000){
cout >> "1" >> endl;
}else{
cout >> "0" >> endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
12 | cout >> "1" >> endl;
| ~~~~ ^~ ~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:12:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
12 | cout >> "1" >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[2]]':
a.cc:12:13: required from here
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:14:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
14 | cout >> "0" >> endl;
| ~~~~ ^~ ~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:14:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | cout >> "0" >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' { |
s304670202 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500;
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
int money=0;
money=c1+(c5*5)+(c10*10)+(c50*50)+(c100*100)+(c500*500);
if(money>=1000){
cout >> "1" >> endl;
}else{
cout >> "0" >> endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
12 | cout >> "1" >> endl;
| ~~~~ ^~ ~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:12:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
12 | cout >> "1" >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[2]]':
a.cc:12:13: required from here
12 | cout >> "1" >> endl;
| ^~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:14:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]')
14 | cout >> "0" >> endl;
| ~~~~ ^~ ~~~
| | |
| | const char [2]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:14:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | cout >> "0" >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> "0" >> endl;
| ^~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:14:13: note: 'std::ostream' { |
s371855122 | p00291 | C++ | #include<iostream>
using namespace std;
int main(){
int c1,c5,c10,c50,c100,c500,num;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
num=c1*1+c5*5+c10*10+c50*50+c100*100+c500*500;
if(num%1000=0){
cout<<"0"<<"\n";
}else{
cout<<"1"<<"\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:7: error: lvalue required as left operand of assignment
12 | if(num%1000=0){
| ~~~^~~~~
|
s079377881 | p00291 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
int table[6]={1,5,10,50,100,500};
int ans=0:
for(int i=0;i<6;i++)
{
int data;
cin>>data;
ans+=data*table[i];
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:10:18: error: expected ',' or ';' before ':' token
10 | int ans=0:
| ^
a.cc:11:21: error: 'i' was not declared in this scope
11 | for(int i=0;i<6;i++)
| ^
|
s808239178 | p00291 | C++ | #include<stdio.h>
int main(void){
int c[6]={1,5,10,50,100,500};
int a[6];
int b=0;
int i;
for(i=0;i<6;i++){
scanf("%d",&a[i]);
b=b+a[i]*c[i];
}
printf("\n");
if(b=>1000)
printf("1\n");
else
printf("0\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:16:10: error: expected primary-expression before '>' token
16 | if(b=>1000)
| ^
|
s279568810 | p00291 | C++ | #include<iostream>
using namespace std;
int main()
{
int c1,c2,c3,c4,c5,c6;
cin >> c1;
cin >> c2;
cin >> c3;
cin >> c4;
cin >> c5;
cin >> c6;
if(c1+(c2*5)+(c3*10)+(c4*50)+(c5*100)+(c6*500) >= 1000)
cout<<"1"<<endl;;
else
cout<<"0"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'else' without a previous 'if'
14 | else
| ^~~~
|
s715164097 | p00291 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include <string>
using namespace std;
int main()
{
#include<iostream>
using namespace std;
int main()
{
int c1,c2,c3,c4,c5,c6;
cin >> c1;
cin >> c2;
cin >> c3;
cin >> c4;
cin >> c5;
cin >> c6;
if(c1+(c2*5)+(c3*10)+(c4*50)+(c5*100)+(c6*500) >= 1000)
cout<<"1"<<endl;
else
cout<<"0"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
10 | int main()
| ^~
a.cc:10:9: note: remove parentheses to default-initialize a variable
10 | int main()
| ^~
| --
a.cc:10:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:11:1: error: a function-definition is not allowed here before '{' token
11 | {
| ^
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s897272359 | p00291 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
int sum = a+b*5+c*10+d*50+e*100+f*500;
if(sum > 1000) cout << 1;
else cout << 0;3 1
return 0;
} | a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before numeric constant
9 | else cout << 0;3 1
| ^~
| ;
|
s315435084 | p00291 | C++ | using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int c1, c5, c10, c50, c100, c500;
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
int ans = 0;
c5 += c1 / 5;
c10 += c5 / 2;
c50 += c10 / 5;
c100 += c50 / 2;
c500 += c100 / 5;
ans = c500 / 2;
cout << ans << endl;
return 0;
}
Add Comment | a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
4 | cin.tie(0);
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:5:9: error: 'ios' has not been declared
5 | ios::sync_with_stdio(false);
| ^~~
a.cc:16:9: error: 'cout' was not declared in this scope
16 | cout << ans << endl;
| ^~~~
a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:24: error: 'endl' was not declared in this scope
16 | cout << ans << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | using namespace std;
a.cc: At global scope:
a.cc:20:1: error: 'Add' does not name a type
20 | Add Comment
| ^~~
|
s287687027 | p00291 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <functional>
#include <sys/timeb.h>
#include <fstream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int c1, c5, c10, c50, c100, c500;
cin >> c1 >> c5 >> c10 >> c50 >> c100 >> c500;
int ans = 0;
c5 += c1 / 5;
c10 += c5 / 2;
c50 += c10 / 5;
c100 += c50 / 2;
c500 += c100 / 5;
ans = c500 / 2;
cout << ans << endl;
return 0;
}
Add Comment | a.cc:28:1: error: 'Add' does not name a type
28 | Add Comment
| ^~~
|
s989333122 | p00291 | C++ | #include <iostream>
using namespace std;
int main(){
int b,a[6]={1,5,10,50,100,500},sum=0;
for (int A=0;A<6;A++){
cin>>b;
sum+=b*a[A];
}
if (sum>=1000) cout<<1<<end;
else cout<<0<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:31: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
9 | if (sum>=1000) cout<<1<<end;
| ~~~~~~~^~~~~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
306 | operator<<(nullptr_t)
| ^~~~~~~~
/usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t'
306 | operator<< |
s965727154 | p00291 | C++ | #include<iostream>
#include<stdio.h>
#include<math.h>
#inlcude<algorithm>
using namespace std;
int main()
{
int g,c1,c5,c10,c50,c100,c500;
cin>>c1>>c5>>c10>>c50>>c100>>c500;
g=c1+c5*5+c10*10+c50*50+c100*100+c500*500;
if(g>=1000)
cout<<"1"<<endl;
else
cout<<"0"<<endl;
return 0;
}
| a.cc:4:2: error: invalid preprocessing directive #inlcude; did you mean #include?
4 | #inlcude<algorithm>
| ^~~~~~~
| include
|
s082879533 | p00291 | C++ | #include <stdio.h>
int main(void) {
int c, d[6] = {1, 5, 10, 50, 100, 500}, i, ans = 0;
for(i = 0; i < n; ++i) {
scanf("%d", &c);
ans += c * d[i];
}
if(ans >= 1000)printf("0\n");
else printf("1\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:18: error: 'n' was not declared in this scope
5 | for(i = 0; i < n; ++i) {
| ^
|
s016208124 | p00291 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,e,f;
cin>>a>>b>>c>>d>>e>>f;
int sum=a+b*5+c*10+d*50+e*100+f*500;
if(sum>=1000){cout<<1<<endl}
else{cout<<0<<endl}
}
| a.cc: In function 'int main()':
a.cc:7:30: error: expected ';' before '}' token
7 | if(sum>=1000){cout<<1<<endl}
| ^
| ;
a.cc:8:21: error: expected ';' before '}' token
8 | else{cout<<0<<endl}
| ^
| ;
|
s137763857 | p00292 | C | #include<stdio.h>
main()
{
int N,K,P,cou;
scanf("%d",&N);
for(cou=1;cou<=N;cou++){
scanf("%d %d",&K.&P);
while(K>0){
for(cou=1;cou<=K;cou++){
k--;
if(K==0){
break;
}
}
}
printf("%d\n",cou);
}
return 0;
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main()
| ^~~~
main.c: In function 'main':
main.c:10:34: error: expected identifier before '&' token
10 | scanf("%d %d",&K.&P);
| ^
main.c:14:33: error: 'k' undeclared (first use in this function)
14 | k--;
| ^
main.c:14:33: note: each undeclared identifier is reported only once for each function it appears in
|
s490787675 | p00292 | C | #include<stdio.h>
int main(void){
int N,K,P,a;
scanf("%d",&N);
for(a=1; a<=N; a++){
scanf("%d %d",&K,&P);
if(P%2==0 K%P==0 && K!=P)
printf("2\n");
else if(P%2==0 && K%P==0 && K==P)
printf("1\n");
else if(P%2==1 && K%P==0)
printf("3\n");
else
printf("%d\n",K%P);
}
return 0;
} | main.c: In function 'main':
main.c:7:26: error: expected ')' before 'K'
7 | if(P%2==0 K%P==0 && K!=P)
| ~ ^~
| )
|
s649660966 | p00292 | C | #include <stdio.h>
int main(){
int N,K,P,i;
scanf("%d",&N);
for(i=1;i<=N;i++){
scanf("%d%d",&K,&P);
if(K%P=0){printf("%d\n",P);}
slse{printf("%d\n",K/P);
}
return 0;
} | main.c: In function 'main':
main.c:7:14: error: lvalue required as left operand of assignment
7 | if(K%P=0){printf("%d\n",P);}
| ^
main.c:8:8: error: 'slse' undeclared (first use in this function)
8 | slse{printf("%d\n",K/P);
| ^~~~
main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:12: error: expected ';' before '{' token
8 | slse{printf("%d\n",K/P);
| ^
| ;
main.c:11:1: error: expected declaration or statement at end of input
11 | }
| ^
|
s656051139 | p00292 | C | #include<stdio.h>
int main(){
int n,a,b;
scanf("%d",&n);
for(;n-->0;){
scanf("%d%d",&a,&b);
printf("%d\n",(a%b==0?b:a%b))
}
return 0;
} | main.c: In function 'main':
main.c:7:30: error: expected ';' before '}' token
7 | printf("%d\n",(a%b==0?b:a%b))
| ^
| ;
8 | }
| ~
|
s874881370 | p00292 | C | #include<iostream>
using namespace std;
int main(void)
{
int a,b,K,P,i,j,N;
scanf("%d ",&N);
for(i=0;i<N;i++){
scanf("%d %d",&K,&P);
a=K%P;
if(a==0){
a=P;
}
printf("%d\n",a);
}
return 0;
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s253718631 | p00292 | C | #include<stdio.h>
int main(void)
{
int p, k, i, N;
scanf_s("%d", &N);
for (i = 0; i < N; i++) {
scanf_s("%d%d", &k, &p);
if (k < p) {
printf("%d\n", k);
}
else {
if (k%p == 0) {
printf("%d\n", p);
}
else {
printf("%d\n", k%p);
}
}
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &N);
| ^~~~~~~
| scanf
|
s252187067 | p00292 | C | #include<stdio.h>
int main(void)
{
int P, K, i, N;
scanf_s("%d", &N);
for (i = 0; i < N; i++) {
scanf_s("%d%d", &K, &P);
if (K < P) {
printf("%d\n", K);
}
else {
if (K%P == 0) {
printf("%d\n", P);
}
else {
printf("%d\n", K%P);
}
}
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &N);
| ^~~~~~~
| scanf
|
s844715196 | p00292 | C | #include<stdio.h>
int main(void)
{
int P, K, i, N,a[100];
scanf_s("%d", &N);
for (i = 0; i < N; i++) {
scanf_s("%d%d", &K, &P);
if (K < P) {
a[i] = P;
}
else {
if (K%P == 0) {
a[i]=K;
}
else {
a[i]=K%P;
}
}
}
for (i = 0; i < N; i++) {
printf("%d\n", a[i]);
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &N);
| ^~~~~~~
| scanf
|
s814149760 | p00292 | C | #include<stdio.h>
int main(void)
{
int P, K, i, N,a[100];
scanf_s("%d", &N);
for (i = 0; i < N; i++) {
scanf_s("%d%d", &K, &P);
if (K < P) {
a[i] = P;
}
else {
if (K%P == 0) {
a[i]=P;
}
else {
a[i]=K%P;
}
}
}
for (i = 0; i < N; i++) {
printf("%d\n", a[i]);
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &N);
| ^~~~~~~
| scanf
|
s458628413 | p00292 | C | #include<stdio.h>
int main(void)
{
int P, K, i, N,a[100];
scanf_s("%d", &N);
for (i = 0; i < N; i++) {
scanf_s("%d%d", &K, &P);
if (K < P) {
a[i] = P;
}
else {
if (K%P == 0) {
a[i]=P;
}
else {
a[i]=K%P;
}
}
}
for (i = 0; i < N; i++) {
printf("%d\n", a[i]);
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &N);
| ^~~~~~~
| scanf
|
s225467875 | p00292 | C | #include<stdio.h>
int main(void)
{
int P, K, i, N;
scanf_s("%d", &N);
for (i = 0; i < N; i++) {
scanf_s("%d%d", &K, &P);
if (K < P) {
printf("%d\n", K);
}
else {
printf("%d\n", K%P);
}
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &N);
| ^~~~~~~
| scanf
|
s854196107 | p00292 | C | #include <stdio.h>
int main ( ){
int N,i,P,K;
for(i=0; i<N; i++){
scanf("%d%d",&P&K);
if(K%P==0)
puts("P");
else
puts("K%P");
}
return 0;
} | main.c: In function 'main':
main.c:6:20: error: invalid operands to binary & (have 'int *' and 'int')
6 | scanf("%d%d",&P&K);
| ~~^
| |
| int *
|
s765742521 | p00292 | C | #include<stdio.h>
int main(){
int N, K, P, i;
for(i = 0; i <= N; i++ )
{ scanf("%d %d %d",&N, &K,&P);
if(K%P==0)
{printf("%d",P);
}
else{printf("%d",K%P )
}
}
return 0;
} | main.c: In function 'main':
main.c:15:27: error: expected ';' before '}' token
15 | else{printf("%d",K%P )
| ^
| ;
16 |
17 | }
| ~
|
s576515400 | p00292 | C | #include<stdio.h>
int main(){
int N, K, P, i;
scanf("%d",&N);
for(i = 0; i <= N; i++ )
{ scanf("%d %d",&K,&P);
if(K%P == 0)
{printf("%d",P);
}
else{printf("%d",K%P )
}
}
return 0;
} | main.c: In function 'main':
main.c:15:27: error: expected ';' before '}' token
15 | else{printf("%d",K%P )
| ^
| ;
16 |
17 | }
| ~
|
s431960096 | p00292 | C | #include <stdio.h>
int main ( ){
int N,i,P,K;
scanf("%d",&N);
for(i=0; i<N; i++){
scanf("%d%d",&P&K);
if(K%P==0)
puts("P");
else
puts("K%P");
}
return 0;
}
| main.c: In function 'main':
main.c:7:20: error: invalid operands to binary & (have 'int *' and 'int')
7 | scanf("%d%d",&P&K);
| ~~^
| |
| int *
|
s651592391 | p00292 | C | #include<stdio.h>
int main(){
int N, K, P, i;
scanf("%d",&N);
for(i = 0; i <= N; i++ )
{ scanf("%d %d",&K,&P);
if(K%P == 0)
{printf("%d\n",P);
}
else{printf("%d\n",K%P )
}
}
return 0;
} | main.c: In function 'main':
main.c:15:29: error: expected ';' before '}' token
15 | else{printf("%d\n",K%P )
| ^
| ;
16 |
17 | }
| ~
|
s969776108 | p00292 | C | #include <stdio.h>
int main ( ){
int N,i,P,K;
scanf("%d",&N);
for(i=0; i<N; i++){
scanf("%d%d",&P&K);
if(K%P==0)
printf("%d\n",P);
else
printf("%d\n",K%P);
}
return 0;
} | main.c: In function 'main':
main.c:7:20: error: invalid operands to binary & (have 'int *' and 'int')
7 | scanf("%d%d",&P&K);
| ~~^
| |
| int *
|
s265577460 | p00292 | C | #include <stdio.h>
int main ( ){
int N,i,P,K;
scanf("%d",&N);
for(i=0; i<N; i++){
scanf("%d%d",&P,&K);
if(K%P==0)
printf("%d\n",P);
else
printf("%d\n",K%P);
} | main.c: In function 'main':
main.c:12:3: error: expected declaration or statement at end of input
12 | }
| ^
|
s851353541 | p00292 | C | #include<stdio.h>
int main(void)
{
int n, k, p, i, x, y, z;
scanf("%d", &n);
for (i = 1; i <= n; i++)
{
scanf("%d %d", &k, &p);
x = k%p;
if (x > 0)
printf("%d\n", x);
else (x == 0){
y = 0;
y = k / p;
printf("%d\n", y);
}
}
return 0;
} | main.c: In function 'main':
main.c:14:30: error: expected ';' before '{' token
14 | else (x == 0){
| ^
| ;
|
s773420346 | p00292 | C | #include<stdio.h>
int main(void)
{
int n, k, p, i, x, y, z;
scanf("%d", &n);
for (i = 1; i <= n; i++)
{
scanf("%d %d", &k, &p);
x = k%p;
if (x > 0)
printf("%d\n", x);
else (x == 0)
y = 0;
y = k / p;
printf("%d\n", y);
}
return 0;
} | main.c: In function 'main':
main.c:14:30: error: expected ';' before 'y'
14 | else (x == 0)
| ^
| ;
15 |
16 | y = 0;
| ~
|
s806794626 | p00292 | C | #include<stdio.h>
int main(void)
{
int n, k, p, i, x, y, z;
scanf("%d\n", &n);
for (i = 1; i <= n; i++)
{
scanf("%d %d\n", &k, &p);
x = k%p;
if (x > 0)
printf("%d\n", x);
else (x == 0)
y = 0;
y = k / p;
printf("%d\n", y);
}
return 0;
} | main.c: In function 'main':
main.c:14:30: error: expected ';' before 'y'
14 | else (x == 0)
| ^
| ;
15 |
16 | y = 0;
| ~
|
s415809547 | p00292 | C | #include<stdio.h>
int main(void)
{
int n, k, p, i, x, y=0, z;
scanf("%d\n", &n);
for (i = 1; i <= n; i++)
{
scanf("%d %d\n", &k, &p);
x = k%p ;
if (x>0)
printf("%d\n", x);
else (x == 0)
y = k / p;
printf("%d\n", y);
}
return 0;
} | main.c: In function 'main':
main.c:14:30: error: expected ';' before 'y'
14 | else (x == 0)
| ^
| ;
15 |
16 | y = k / p;
| ~
|
s320395615 | p00292 | C | #include <stdio.h>
int main(void){
int n, k, p;
int i;
scanf("%d", &n);
for(i = 0; i < n; i++){
scanf("%d %d", &k, &p);
if(k % p == 0)
printf("%d\n", p);
else
printf("%d\n", k % p);
}
return 0:
} | main.c: In function 'main':
main.c:15:13: error: expected ';' before ':' token
15 | return 0:
| ^
| ;
|
s009464487 | p00292 | C | #include <stdio.h>
int main(void){
int K,P,n;
scanf ("%d",&K);
scanf ("&d",&p);
if (K % P == 0)
n = P;
else
n = K % P;
printf ("%d\n",n);
return 0;
} | main.c: In function 'main':
main.c:7:18: error: 'p' undeclared (first use in this function)
7 | scanf ("&d",&p);
| ^
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
|
s645784221 | p00292 | C | #include <stdio.h>
int main(void){
int K,P,N;
scanf ("%d",&N);
scanf ("%d",&K);
scanf ("&d",&P);
while (N > 0){
if (K % P == 0)
ptintf ("%d",n = P);
else
printf ("%d",n = K % P);
N--;
}
return 0;
} | main.c: In function 'main':
main.c:12:13: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
12 | ptintf ("%d",n = P);
| ^~~~~~
| printf
main.c:12:26: error: 'n' undeclared (first use in this function)
12 | ptintf ("%d",n = P);
| ^
main.c:12:26: note: each undeclared identifier is reported only once for each function it appears in
|
s373264235 | p00292 | C | #include <stdio.h>
int main(void){
int K,P,N;
scanf ("%d",&N);
scanf ("%d",&K);
scanf ("&d",&P);
while (N > 0){
if (K % P == 0)
ptintf ("%d",P);
else
printf ("%d",K % P);
N--;
}
return 0;
} | main.c: In function 'main':
main.c:12:13: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
12 | ptintf ("%d",P);
| ^~~~~~
| printf
|
s217846545 | p00292 | C | 1 #include <stdio.h>
2 int main(void){
3 int n,k[n],p[n],w[n];
4 int i,j;
5
6 scanf("%d",&n);
7
8 for(i=0; i<n; i++){
9
10 scanf("%d %d",&k[i],&p[i]);
11
12 if(k[i]%p[i]==0)
13 w[i]=p[i];
14
15 else
16 w[i]=k[i]%p[i];
17
18 }
19
20 for(i=0; i<n; i++){
21
22 printf("%d\n",w[i]);
23
24 }
25
26 return 0;
27
28 } | main.c:1:2: error: expected identifier or '(' before numeric constant
1 | 1 #include <stdio.h>
| ^
main.c:1:4: error: stray '#' in program
1 | 1 #include <stdio.h>
| ^
|
s449308412 | p00292 | C | 1 #include <stdio.h>
2 int main(void){
3 int n,k[n],p[n],w[n];
4 int i,j;
5
6 scanf("%d",&n);
7
8 for(i=0; i<n; i++){
9
10 scanf("%d %d",&k[i],&p[i]);
11
12 if(k[i]%p[i]==0)
13 w[i]=p[i];
14
15 else
16 w[i]=k[i]%p[i];
17
18 }
19
20 for(i=0; i<n; i++){
21
22 printf("%d\n",w[i]);
23
24 }
25
26 return 0;
27
28 } | main.c:1:2: error: expected identifier or '(' before numeric constant
1 | 1 #include <stdio.h>
| ^
main.c:1:4: error: stray '#' in program
1 | 1 #include <stdio.h>
| ^
|
s609110322 | p00292 | C | 1 #include <stdio.h>
2 int main(void){
3 int n,k[n],p[n],w[n];
4 int i,j;
5
6 scanf("%d",&n);
7
8 for(i=0; i<n; i++){
9
10 scanf("%d %d",&k[i],&p[i]);
11
12 if(k[i]%p[i]==0)
13 w[i]=p[i];
14
15 else
16 w[i]=k[i]%p[i];
17
18 }
19
20 for(i=0; i<n; i++){
21
22 printf("%d\n",w[i]);
23
24 }
25
26 return 0;
27
28 } | main.c:1:2: error: expected identifier or '(' before numeric constant
1 | 1 #include <stdio.h>
| ^
main.c:1:4: error: stray '#' in program
1 | 1 #include <stdio.h>
| ^
|
s712927153 | p00292 | C | #include <stdio.h>
int main(void){
int K,P,N;
scanf ("%d",&N);
scanf ("%d",&K);
scanf ("&d",&P);
while (N > 0){
if (K % P == 0)
ptintf ("%d\n",P);
else
printf ("%d\n",K % P);
N--;
}
return 0;
} | main.c: In function 'main':
main.c:12:13: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
12 | ptintf ("%d\n",P);
| ^~~~~~
| printf
|
s194072557 | p00292 | C | 1 #include <stdio.h>
2 int main(void){
3 int n,k[n],p[n],w[n];
4 int i,j;
5
6 scanf("%d",&n);
7
8 for(i=0; i<n; i++){
9
10 scanf("%d %d",&k[i],&p[i]);
11
12 if(k[i]%p[i]==0)
13 w[i]=p[i];
14
15 else
16 w[i]=k[i]%p[i];
17
18 }
19
20 for(i=0; i<n; i++){
21
22 printf("%d\n",w[i]);
23
24 }
25
26 return 0;
27
28 } | main.c:1:2: error: expected identifier or '(' before numeric constant
1 | 1 #include <stdio.h>
| ^
main.c:1:4: error: stray '#' in program
1 | 1 #include <stdio.h>
| ^
|
s415250167 | p00292 | C | #include <stdio.h>
2
3 int main(void)
4 {
5 int times; // N
6 int value[times]; // K
7 int headCount[times]; // P
8 int i;
9
10 // printf("???????????????????????°?????\????????????????????????");
11 scanf("%d", ×);
12
13 for (i = 0; i < times; i++)
14 {
15 // printf("???????????°??¨?????°?????\????????????????????????");
16 scanf("%d %d", &value[i], &headCount[i]);
17 }
18
19 for (i = 0; i < times; i++)
20 {
21 if ((value[i] % headCount[i]) == 0)
22 {
23 printf("%d\n", headCount[i]);
24 }
25 else
26 {
27 printf("%d\n", value[i] % headCount[i]);
28 }
29 }
30
31 return 0;
32 } | main.c:2:3: error: expected identifier or '(' before numeric constant
2 | 2
| ^
|
s628736777 | p00292 | C | #include <stdio.h>
int main(void){
int K,P,N;
scanf ("%d",&N);
while (N > 1){
scanf ("%d",&K);
scanf ("&d",&P);
if (K % P == 0)
ptintf ("%d\n",P);
else
printf ("%d\n",K % P);
N--;
}
return 0;
} | main.c: In function 'main':
main.c:14:13: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
14 | ptintf ("%d\n",P);
| ^~~~~~
| printf
|
s936727045 | p00292 | C | #include <stdio.h>
int main(void){
int K,P,N;
scanf ("%d",&N);
while (N > 1){
scanf ("%d",&K);
scanf ("%d",&P);
if (K % P == 0)
ptintf ("%d\n",P);
else
printf ("%d\n",K % P);
N--;
}
return 0;
} | main.c: In function 'main':
main.c:14:13: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
14 | ptintf ("%d\n",P);
| ^~~~~~
| printf
|
s321021553 | p00292 | C | 1 #include <stdio.h>
2 int main(void){
3 int n,k[n],p[n],w[n];
4 int i,j;
5
6 scanf("%d",&n);
7
8 for(i=0; i<n; i++){
9
10 scanf("%d %d",&k[i],&p[i]);
11
12 if(k[i]%p[i]==0)
13 w[i]=p[i];
14
15 else
16 w[i]=k[i]%p[i];
17
18 }
19
20 for(i=0; i<n; i++){
21
22 printf("%d\n",w[i]);
23
24 }
25
26 return 0;
27
28 } | main.c:1:2: error: expected identifier or '(' before numeric constant
1 | 1 #include <stdio.h>
| ^
main.c:1:4: error: stray '#' in program
1 | 1 #include <stdio.h>
| ^
|
s387150384 | p00292 | C | #include <stdi.h>
int main(void){
int times,i;
int K[times];
int P[times];
scanf("%d",×);
for(i=0;i<times;i++){
scanf("%d %d",&K[i],&P[i]);
}
for(i=0;i<times;i++){
if(K[i]%P[i]==0){
printf("%d\n",P[i]);
}else{
printf("%d\n",K[i]%P[i]);
}
}
return 0;
} | main.c:1:10: fatal error: stdi.h: No such file or directory
1 | #include <stdi.h>
| ^~~~~~~~
compilation terminated.
|
s335535361 | p00292 | C | #include<stdio.h>
int main(void){
int w,n,i,k[n],p[n];
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d %d",&k[i],&p[i]);
for(i=0;i<n;i++){
w=k[i]%p[i];
if(w==0)
printf("%d\n",p[i]);
else
printf("%d\n",w);
return 0;
} | main.c: In function 'main':
main.c:16:1: error: expected declaration or statement at end of input
16 | }
| ^
|
s543566807 | p00292 | C | #include<stdio.h>
int main(void){
int w,n,i,k[n],p[n];
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d %d",&k[i],&p[i]);
for(i=0;i<n;i++){
w=k[i]%p[i];
if(w==0)
printf("%d\n",p[i]);
else
printf("%d\n",w);
}
return 0;
| main.c: In function 'main':
main.c:15:5: error: expected declaration or statement at end of input
15 | return 0;
| ^~~~~~
|
s847210158 | p00292 | C | #include <stdio.h>
int main(void){
int i,n,k,p;
int x[100];
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d %d",&k,&p);
if(k%p==0){
w=p:
}else if(k%p!=0){
w=k%p;
}
x[i]=w;
}
for(i=0;i<n;i++){
printf("%d\n",x[i]);
}
return 0;
} | main.c: In function 'main':
main.c:9:13: error: 'w' undeclared (first use in this function)
9 | w=p:
| ^
main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:16: error: expected ';' before ':' token
9 | w=p:
| ^
| ;
|
s552614615 | p00292 | C | #include <stdio.h>
int main(void){
int i,n,k,p,w;
int x[100];
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d %d",&k,&p);
if(k%p==0){
w=p:
}else if(k%p!=0){
w=k%p;
}
x[i]=w;
}
for(i=0;i<n;i++){
printf("%d\n",x[i]);
}
return 0;
} | main.c: In function 'main':
main.c:9:16: error: expected ';' before ':' token
9 | w=p:
| ^
| ;
|
s514522295 | p00292 | C++ | #include<stdio.h>
int main(){
int n;scanf("%d",&n);while(n--){int a,b;scanf("%d%d",&a,&b);
int c=(a-1)%b+1;printf("%d\n",c);
} | a.cc: In function 'int main()':
a.cc:5:2: error: expected '}' at end of input
5 | }
| ^
a.cc:2:11: note: to match this '{'
2 | int main(){
| ^
|
s043807064 | p00292 | C++ | #include<stdio.h>
int main(){
int n;
scanf("%d",&n);
for(int i=0;i<n;i++){
int k,p;
scanf("%d%d",&k,&p);
int t=k%p;
t=p-t;
printf("%d\n",t);
}
return 0;
}#include<stdio.h>
int main(){
int n;
scanf("%d",&n);
for(int i=0;i<n;i++){
int k,p;
scanf("%d%d",&k,&p);
int t=k%p;
if(t==0)t=p;
printf("%d\n",t);
}
return 0;
} | a.cc:15:2: error: stray '#' in program
15 | }#include<stdio.h>
| ^
a.cc:15:3: error: 'include' does not name a type
15 | }#include<stdio.h>
| ^~~~~~~
|
s363008364 | p00292 | C++ | #include<stdio.h>
int main(){
int n;
scanf("%d",&n);
while(n--){
int a,b;
scanf("%d %d",&a,&b);
if(a<b){
printf("%d\n",a);
}else{
printf("%d\n"b%a);
}
}
} | a.cc: In function 'int main()':
a.cc:11:8: error: unable to find string literal operator 'operator""b' with 'const char [4]', 'long unsigned int' arguments
11 | printf("%d\n"b%a);
| ^~~~~~~
|
s958880545 | p00292 | C++ | #include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main(){
int a,ii = 0;
cin >> a;
int b[a],c[a],ans[a];
while(a > ii){
cin >> b[ii] >> c[ii];
ans[i] = b[ii] % c[ii];
if(ans[ii] == 0) ans[ii] = c[ii];
ii++;
}
ii = 0;
while(a > ii){
cout << ans[ii] << endl;
ii++;
}
} | a.cc: In function 'int main()':
a.cc:13:9: error: 'i' was not declared in this scope
13 | ans[i] = b[ii] % c[ii];
| ^
|
s871047982 | p00292 | C++ | int main(){
int n,k[1000],p[1000];
cin>>n;
for(int i=0;i<n;i++){
cin>>k[i]>>p[i];
if(k[i]%p[i]==0)
cout<<p[i]<<endl;
else
cout<<k[i]%p[i]<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin>>n;
| ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
7 | cout<<p[i]<<endl;
| ^~~~
a.cc:7:21: error: 'endl' was not declared in this scope
7 | cout<<p[i]<<endl;
| ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope
9 | cout<<k[i]%p[i]<<endl;
| ^~~~
a.cc:9:26: error: 'endl' was not declared in this scope
9 | cout<<k[i]%p[i]<<endl;
| ^~~~
|
s504372577 | p00292 | C++ | int main(){
int a;
std::cin >> a;
while(a--){
int n,m;
std::cin >> n >> m;
if(n % m ==0){
std::cout << m << std::endl;
}else{
std::cout << n % m << std::endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' is not a member of 'std'
4 | std::cin >> a;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main(){
a.cc:7:14: error: 'cin' is not a member of 'std'
7 | std::cin >> n >> m;
| ^~~
a.cc:7:14: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:22: error: 'cout' is not a member of 'std'
9 | std::cout << m << std::endl;
| ^~~~
a.cc:9:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:40: error: 'endl' is not a member of 'std'
9 | std::cout << m << std::endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | int main(){
a.cc:11:30: error: 'cout' is not a member of 'std'
11 | std::cout << n % m << std::endl;
| ^~~~
a.cc:11:30: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:52: error: 'endl' is not a member of 'std'
11 | std::cout << n % m << std::endl;
| ^~~~
a.cc:11:52: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s107948091 | p00292 | C++ | int main(){
int a;
std::cin >> a;
while(a--){
int n,m;
std::cin >> n >> m;
std::cout << (n % m == 0 ? m : n % m) << std::endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' is not a member of 'std'
4 | std::cin >> a;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main(){
a.cc:7:14: error: 'cin' is not a member of 'std'
7 | std::cin >> n >> m;
| ^~~
a.cc:7:14: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:14: error: 'cout' is not a member of 'std'
8 | std::cout << (n % m == 0 ? m : n % m) << std::endl;
| ^~~~
a.cc:8:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:55: error: 'endl' is not a member of 'std'
8 | std::cout << (n % m == 0 ? m : n % m) << std::endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | int main(){
|
s541046562 | p00292 | C++ | int main(){
int a;
std::cin >> a;
for(int i=a; i=0; i--){
int n,m;
std::cin >> n >> m;
if(n % m ==0){
std::cout << m << std::endl;
}else{
std::cout << n % m << std::endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' is not a member of 'std'
4 | std::cin >> a;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main(){
a.cc:7:14: error: 'cin' is not a member of 'std'
7 | std::cin >> n >> m;
| ^~~
a.cc:7:14: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:22: error: 'cout' is not a member of 'std'
9 | std::cout << m << std::endl;
| ^~~~
a.cc:9:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:40: error: 'endl' is not a member of 'std'
9 | std::cout << m << std::endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | int main(){
a.cc:11:30: error: 'cout' is not a member of 'std'
11 | std::cout << n % m << std::endl;
| ^~~~
a.cc:11:30: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:52: error: 'endl' is not a member of 'std'
11 | std::cout << n % m << std::endl;
| ^~~~
a.cc:11:52: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s727149554 | p00292 | C++ | #include<iostream>
int main(){
int a,b[1000],c[1000],d,e;
std::cin >> a;
for(int i=0;i<a;i++){
std;;cin >> b[i] >> c[i];
}
for(int i=0;i<a;i++){
std::cout << b[i]%+c[i] << std::endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:12: error: expected primary-expression before ';' token
6 | std;;cin >> b[i] >> c[i];
| ^
a.cc:6:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | std;;cin >> b[i] >> c[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
|
s671995960 | p00292 | C++ | #include<iostream>
int main(){
int a,b[1000],c[1000],d,e;
std::cin >> a;
for(int i=0;i<a;i++){
std;;cin >> b[i] >> c[i];
}
for(int i=0;i<a;i++){
std::cout << b[i]%=c[i] << std::endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:12: error: expected primary-expression before ';' token
6 | std;;cin >> b[i] >> c[i];
| ^
a.cc:6:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | std;;cin >> b[i] >> c[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:33: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
9 | std::cout << b[i]%=c[i] << std::endl;
| ~~~~~^~~~~~~~~~~~
|
s107556289 | p00292 | C++ | #include<iostream>
int main(){
int a,b[1000],c[1000];
std::cin >> a;
for(int i=0;i<a;i++){
std;;cin >> b[i] >> c[i];
}
for(int i=0;i<a;i++){
std::cout << b[i]%=c[i] << std::endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:12: error: expected primary-expression before ';' token
6 | std;;cin >> b[i] >> c[i];
| ^
a.cc:6:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | std;;cin >> b[i] >> c[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:33: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
9 | std::cout << b[i]%=c[i] << std::endl;
| ~~~~~^~~~~~~~~~~~
|
s645982768 | p00292 | C++ | #include<iostream>
int main(){
int a,b[1000],c[1000];
std::cin >> a;
for(int i=0;i<a;i++){
std;;cin >> b[i] >> c[i];
}
for(int i=0;i<a;i++){
if(b[i]%c[i] == 0)b[i]%=c[i]+1;
else b[i]%=c[i]
std::cout << b[i] << std::endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:12: error: expected primary-expression before ';' token
6 | std;;cin >> b[i] >> c[i];
| ^
a.cc:6:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | std;;cin >> b[i] >> c[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:24: error: expected ';' before 'std'
10 | else b[i]%=c[i]
| ^
| ;
11 | std::cout << b[i] << std::endl;
| ~~~
|
s353941064 | p00292 | C++ | #include<iostream>
using namespace std;
int n,k,p,ke;
int in(){
cin>>n;
}
int out(){
for(int a=0;a<n;a++){
cin>>k>>p;
ke=k%p;
if(k==0)
ke=p;
cout<<ke<<endl;
}
int main(){
in();
out();
} | a.cc: In function 'int in()':
a.cc:6:1: warning: no return statement in function returning non-void [-Wreturn-type]
6 | }
| ^
a.cc: In function 'int out()':
a.cc:15:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
15 | int main(){
| ^~
a.cc:15:9: note: remove parentheses to default-initialize a variable
15 | int main(){
| ^~
| --
a.cc:15:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:15:11: error: a function-definition is not allowed here before '{' token
15 | int main(){
| ^
a.cc:18:2: error: expected '}' at end of input
18 | }
| ^
a.cc:7:10: note: to match this '{'
7 | int out(){
| ^
a.cc:18:2: warning: no return statement in function returning non-void [-Wreturn-type]
18 | }
| ^
|
s923265694 | p00292 | C++ | #include<iostream>
using namespace std;
int n,k,p,ke;
int in(){
cin>>n;
}
int out(){
for(int a=0;a<n;a++){
cin>>k>>p;
ke=k%p;
if(ke==0)
ke=p;
cout<<ke<<endl;
}
int main(){
in();
out();
} | a.cc: In function 'int in()':
a.cc:6:1: warning: no return statement in function returning non-void [-Wreturn-type]
6 | }
| ^
a.cc: In function 'int out()':
a.cc:15:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
15 | int main(){
| ^~
a.cc:15:9: note: remove parentheses to default-initialize a variable
15 | int main(){
| ^~
| --
a.cc:15:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:15:11: error: a function-definition is not allowed here before '{' token
15 | int main(){
| ^
a.cc:18:2: error: expected '}' at end of input
18 | }
| ^
a.cc:7:10: note: to match this '{'
7 | int out(){
| ^
a.cc:18:2: warning: no return statement in function returning non-void [-Wreturn-type]
18 | }
| ^
|
s332506622 | p00292 | C++ | import java.util.*;
class Main{
int n,m;
int a,b;
Main(){
Scanner sc = new Scanner(System.in);
n=sc.nextInt();
while(n>0){
n--;
a=sc.nextInt();
b=sc.nextInt();
m=a%b;
if(m==0)m=b;
System.out.println(m);
}
}
public static void main(String[] args){
new Main();
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:22:11: error: expected ':' before 'static'
22 | public static void main(String[] args){
| ^~~~~~~
| :
a.cc:22:29: error: 'String' has not been declared
22 | public static void main(String[] args){
| ^~~~~~
a.cc:22:38: error: expected ',' or '...' before 'args'
22 | public static void main(String[] args){
| ^~~~
a.cc:25:2: error: expected ';' after class definition
25 | }
| ^
| ;
a.cc: In constructor 'Main::Main()':
a.cc:8:9: error: 'Scanner' was not declared in this scope
8 | Scanner sc = new Scanner(System.in);
| ^~~~~~~
a.cc:9:11: error: 'sc' was not declared in this scope
9 | n=sc.nextInt();
| ^~
a.cc:16:13: error: 'System' was not declared in this scope
16 | System.out.println(m);
| ^~~~~~
|
s900310534 | p00292 | C++ | n = int(input())
for i in range(n):
k, p = map(int, input().split())
if k % p == 0:
print(p)
else:
print(k % p) | a.cc:1:1: error: 'n' does not name a type
1 | n = int(input())
| ^
|
s205271153 | p00292 | C++ | 3
10 3
2 10
4 2 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s384586515 | p00292 | C++ | #include<cstdio>
int main()
{
int n,k,p;
scanf("%d",&n);
for(int i=0;i<=n-1;i++) {
scanf("%d",&k,&p);
if(k%p==0) printf("%d\n",p);
else if(k%p!=0) int b=k%p;printf("%d\n",b);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:45: error: 'b' was not declared in this scope
9 | else if(k%p!=0) int b=k%p;printf("%d\n",b);
| ^
|
s468719426 | p00292 | C++ | import java.util.*;
class Main{
public static void main(String[] args){
Solve s = new Solve();
s.solve();
}
}
class Solve{
Solve(){}
Scanner in = new Scanner(System.in);
void solve(){
int n = in.nextInt();
for(int i = 0; i < n; i++){
int a = in.nextInt(), b = in.nextInt();
int c = (a % b == 0 ? b : a % b);
System.out.println(a % b);
}
}
}
// while(in.hasNext()){
// int n = in.nextInt();
// if(n == 0) return;
// } | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
4 | public static void main(String[] args){
| ^~~~~~~
| :
a.cc:4:33: error: 'String' has not been declared
4 | public static void main(String[] args){
| ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'args'
4 | public static void main(String[] args){
| ^~~~
a.cc:8:2: error: expected ';' after class definition
8 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:17: error: 'Solve' was not declared in this scope
5 | Solve s = new Solve();
| ^~~~~
a.cc:6:17: error: 's' was not declared in this scope
6 | s.solve();
| ^
a.cc: At global scope:
a.cc:13:9: error: 'Scanner' does not name a type
13 | Scanner in = new Scanner(System.in);
| ^~~~~~~
a.cc:25:2: error: expected ';' after class definition
25 | }
| ^
| ;
a.cc: In member function 'void Solve::solve()':
a.cc:16:25: error: 'in' was not declared in this scope; did you mean 'int'?
16 | int n = in.nextInt();
| ^~
| int
a.cc:20:38: error: 'b' was not declared in this scope
20 | int c = (a % b == 0 ? b : a % b);
| ^
a.cc:21:25: error: 'System' was not declared in this scope
21 | System.out.println(a % b);
| ^~~~~~
|
s098675740 | p00292 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin >> N:
for(int i=0;i<N;i++){
int k, p, u=0; cin >> k >> p;
while(k) {
k--;
u++;
if(u==p)u=0;
}
cout << u+1 << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:16: error: expected ';' before ':' token
4 | int N; cin >> N:
| ^
| ;
a.cc:5:13: error: 'i' was not declared in this scope
5 | for(int i=0;i<N;i++){
| ^
|
s233623707 | p00292 | C++ | #include<stdio.h>
int main(void)
{
int a[100],n,k,p,j,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&k,&p);
if(k%p==0){
a[i]=p;
}
else{
a[i]=k%p;
}
}
for(j=o;j<n;j++){
printf("%d\n",a[j]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:15: error: 'o' was not declared in this scope
15 | for(j=o;j<n;j++){
| ^
|
s710110525 | p00292 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
cin >> n;
for(int i=0,i<n,i++){
int k,p;
cin >> k >> p;
if(k<p){
cout << k << endl;
}if(k%p==0){
cout << p << endl;
}if(k%p!=0){
cout << k%p << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '<' token
8 | for(int i=0,i<n,i++){
| ^
| ;
a.cc:8:16: error: expected primary-expression before '<' token
a.cc:8:22: error: expected ';' before ')' token
8 | for(int i=0,i<n,i++){
| ^
| ;
|
s149590878 | p00292 | C++ | #include <iostream>
using namespace std;
int main(){
int N,K,P;
cin>>N;
for(int i=0;i<N;i++){
cin>>K>>P;
cout<<K%p<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:25: error: 'p' was not declared in this scope
8 | cout<<K%p<<endl;
| ^
|
s772028506 | p00292 | C++ | #include <iostream>
using namespace std;
int main(){
int N,K,P;
cin>>N;
for(int i=0;i<N;i++){
cin>>K>>P;
cout<<K%P<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s640510302 | p00292 | C++ | #include<iostream>
using namespace std;
int main (){
int N;
int K[N];
int P[N];
cin>>N;
for(int i=0;i<N;i++){
cin>>K[i]>>P[i];
}
for(int j=0;j<N;j++){
cout<<K[i]%P[i]<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:25: error: 'i' was not declared in this scope
13 | cout<<K[i]%P[i]<<endl;
| ^
|
s528003005 | p00292 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
cin>>N;
int K[N],P[n]
for(int i=0;i<N;i++){
cin>>K[i]>>P[i];
}
for(int j=0;j<N;j++){
if(K>P){
cout<<K[i]-K[i]/P[i]<<endl;
else{
cout<<P[i]%K[i]<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:20: error: 'n' was not declared in this scope
6 | int K[N],P[n]
| ^
a.cc:7:9: error: expected initializer before 'for'
7 | for(int i=0;i<N;i++){
| ^~~
a.cc:7:21: error: 'i' was not declared in this scope
7 | for(int i=0;i<N;i++){
| ^
a.cc:11:22: error: 'P' was not declared in this scope
11 | if(K>P){
| ^
a.cc:13:17: error: expected '}' before 'else'
13 | else{
| ^~~~
a.cc:11:24: note: to match this '{'
11 | if(K>P){
| ^
a.cc:17:2: error: expected '}' at end of input
17 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s517233234 | p00292 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
cin>>N;
int K[N],P[n]
for(int i=0;i<N;i++){
cin>>K[i]>>P[i];
}
for(int j=0;j<N;j++){
if(K>P){
cout<<K[i]-K[i]/P[i]<<endl;
}
else{
cout<<P[i]%K[i]<<endl;
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:20: error: 'n' was not declared in this scope
6 | int K[N],P[n]
| ^
a.cc:7:9: error: expected initializer before 'for'
7 | for(int i=0;i<N;i++){
| ^~~
a.cc:7:21: error: 'i' was not declared in this scope
7 | for(int i=0;i<N;i++){
| ^
a.cc:11:22: error: 'P' was not declared in this scope
11 | if(K>P){
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.