submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s099769197
p03860
Java
sample
Main.java:1: error: reached end of file while parsing sample ^ 1 error
s765237278
p03860
C++
#include <iostream> using namespace std; #include <bits/stdc++.h> #include<cstring> #include<cmath> #include<cstdio> #include<string> #include<string.h> #include<stdio.h> #include <vector> #include <map> int main() { long long int a,b,x; cin >> a >> b >> x; if(a%x == 0) { cout << (b/c - a/c) +1; } else { cout << (b/c - a/c) << endl; } }
a.cc: In function 'int main()': a.cc:20:17: error: 'c' was not declared in this scope 20 | cout << (b/c - a/c) +1; | ^ a.cc:25:19: error: 'c' was not declared in this scope 25 | cout << (b/c - a/c) << endl; | ^
s424587857
p03860
C++
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF (1ll << 60) #define sz(x) int(x.size()) using namespace std; typedef long long ll; using vl = vector<ll>; using vvl = vector<vl>; typedef double db; typedef string str; typedef pair<ll, ll> p; constexpr int MOD = 1000000007; using ll = long long; template <class T> inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } void print(const std::vector<int> &v) { std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; }); std::cout << std::endl; } int main() { string a; string b; string c; cin >> a >> b >> c; cout << "A" << b[0] << "C" << endl; return 0 }
a.cc: In function 'int main()': a.cc:42:13: error: expected ';' before '}' token 42 | return 0 | ^ | ; 43 | } | ~
s941661997
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { char S1[], S2[], S3[]; cin >> S1 >> S2 >> S3; cout << 'A' + S2[0] + 'C' << endl; }
a.cc: In function 'int main()': a.cc:6:8: error: storage size of 'S1' isn't known 6 | char S1[], S2[], S3[]; | ^~ a.cc:6:14: error: storage size of 'S2' isn't known 6 | char S1[], S2[], S3[]; | ^~ a.cc:6:20: error: storage size of 'S3' isn't known 6 | char S1[], S2[], S3[]; | ^~
s111255930
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { char S1[10], S2[111], S3[10]; cin >> S1[] >> S2[] >> S3[]; cout << 'A' + S2[0] + 'C' << endl; }
a.cc: In function 'int main()': a.cc:7:13: error: expected primary-expression before ']' token 7 | cin >> S1[] >> S2[] >> S3[]; | ^ a.cc:7:21: error: expected primary-expression before ']' token 7 | cin >> S1[] >> S2[] >> S3[]; | ^ a.cc:7:29: error: expected primary-expression before ']' token 7 | cin >> S1[] >> S2[] >> S3[]; | ^
s618177894
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { char S1[], S2[], S3[]; cin >> S1[] >> S2[] >> S3[]; cout << 'A' + S2[0] + 'C' << endl; }
a.cc: In function 'int main()': a.cc:6:8: error: storage size of 'S1' isn't known 6 | char S1[], S2[], S3[]; | ^~ a.cc:6:14: error: storage size of 'S2' isn't known 6 | char S1[], S2[], S3[]; | ^~ a.cc:6:20: error: storage size of 'S3' isn't known 6 | char S1[], S2[], S3[]; | ^~ a.cc:7:13: error: expected primary-expression before ']' token 7 | cin >> S1[] >> S2[] >> S3[]; | ^ a.cc:7:21: error: expected primary-expression before ']' token 7 | cin >> S1[] >> S2[] >> S3[]; | ^ a.cc:7:29: error: expected primary-expression before ']' token 7 | cin >> S1[] >> S2[] >> S3[]; | ^
s225539690
p03860
C
#include <iostream> using namespace std; int main() { string S1, S2, S3; cin >> S1 >> S2 >> S3; cout << 'A'+S2.at(0)+'C' << endl; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s301795219
p03860
C
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; cout << a[0]+ b[0] +c[0] << endl; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s598048968
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { String S1, S2, S3; cin >> S1 >> S2 >> S3; cout << S1.at(0)+S2.at(0)+S3.at(0) << endl; }
a.cc: In function 'int main()': a.cc:6:3: error: 'String' was not declared in this scope 6 | String S1, S2, S3; | ^~~~~~ a.cc:7:10: error: 'S1' was not declared in this scope; did you mean 'y1'? 7 | cin >> S1 >> S2 >> S3; | ^~ | y1 a.cc:7:16: error: 'S2' was not declared in this scope 7 | cin >> S1 >> S2 >> S3; | ^~ a.cc:7:22: error: 'S3' was not declared in this scope 7 | cin >> S1 >> S2 >> S3; | ^~
s719449316
p03860
Java
import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); String c = sc.next(); a = a.charAt(1); b = b.charAt(1); c = c.charAt(1); System.out.println(a + b + c); } }
Main.java:10: error: incompatible types: char cannot be converted to String a = a.charAt(1); ^ Main.java:11: error: incompatible types: char cannot be converted to String b = b.charAt(1); ^ Main.java:12: error: incompatible types: char cannot be converted to String c = c.charAt(1); ^ 3 errors
s403708745
p03860
C
#include <stdio.h> int main(void) { char *ac, string, contest; scanf("%s %s %s", &ac, &string, &contest); printf("A%cC", string[0]); return 0; }
main.c: In function 'main': main.c:6:30: error: subscripted value is neither array nor pointer nor vector 6 | printf("A%cC", string[0]); | ^
s866731328
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; cout<<a,at(0) << b.at(0) <<c.at(0) <<endl; }
a.cc: In function 'int main()': a.cc:7:11: error: 'at' was not declared in this scope; did you mean 'a'? 7 | cout<<a,at(0) << b.at(0) <<c.at(0) <<endl; | ^~ | a
s346416956
p03860
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str[] = new String[3]; for (int i=0;i<3;i++){ str[i]=scan.next(); str[i]=substring(0,1); } System.out.println(str[0]+str[1]+str[2]); } }
Main.java:8: error: cannot find symbol str[i]=substring(0,1); ^ symbol: method substring(int,int) location: class Main 1 error
s097521235
p03860
C
#include <stdio.h> int main(){ char s[], a = 'A', c = 'C'; scanf("%s", s); printf("A%cC", s[0]); return 0; }
main.c: In function 'main': main.c:4:8: error: array size missing in 's' 4 | char s[], a = 'A', c = 'C'; | ^
s101638850
p03860
C
#include <stdio.h> #include <string.h> int main(){ char s[100], *x, *y, a = 'A', c = 'C'; scanf("%s", s); x = strcat(a, a[0]); y = strcat(x, c); printf("%s", y); return 0; }
main.c: In function 'main': main.c:7:18: error: subscripted value is neither array nor pointer nor vector 7 | x = strcat(a, a[0]); | ^ main.c:7:14: error: passing argument 1 of 'strcat' makes pointer from integer without a cast [-Wint-conversion] 7 | x = strcat(a, a[0]); | ^ | | | char In file included from main.c:2: /usr/include/string.h:149:39: note: expected 'char * restrict' but argument is of type 'char' 149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src) | ~~~~~~~~~~~~~~~~~^~~~~~ main.c:8:17: error: passing argument 2 of 'strcat' makes pointer from integer without a cast [-Wint-conversion] 8 | y = strcat(x, c); | ^ | | | char /usr/include/string.h:149:70: note: expected 'const char * restrict' but argument is of type 'char' 149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src) | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s370693011
p03860
C
#include <stdio.h> #include <string.h> int main(){ char s[100], *x, *y a = 'A', c = 'C'; scanf("%s", s); x = strcat(a, a[0]); y = strcat(x, c); printf("%s", y); return 0; }
main.c: In function 'main': main.c:5:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a' 5 | char s[100], *x, *y a = 'A', c = 'C'; | ^ main.c:7:14: error: 'a' undeclared (first use in this function) 7 | x = strcat(a, a[0]); | ^ main.c:7:14: note: each undeclared identifier is reported only once for each function it appears in main.c:8:3: error: 'y' undeclared (first use in this function) 8 | y = strcat(x, c); | ^ main.c:8:17: error: 'c' undeclared (first use in this function) 8 | y = strcat(x, c); | ^
s236856458
p03860
C
#include <stdio.h> #include <string.h> int main(){ char s[100], *x, a = 'A', c = 'C'; scanf("%s", s); x = strcat(a. a[0], c); printf("%s", x); return 0; }
main.c: In function 'main': main.c:7:15: error: request for member 'a' in something not a structure or union 7 | x = strcat(a. a[0], c); | ^ main.c:7:23: error: passing argument 2 of 'strcat' makes pointer from integer without a cast [-Wint-conversion] 7 | x = strcat(a. a[0], c); | ^ | | | char In file included from main.c:2: /usr/include/string.h:149:70: note: expected 'const char * restrict' but argument is of type 'char' 149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src) | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s042474099
p03860
C
#include <stdio.h> int main(){ char s[100], *x, a = 'A', c = 'C'; scanf("%s", s); x = strcat(a. a[0], c); printf("%s", x); return 0; }
main.c: In function 'main': main.c:6:7: error: implicit declaration of function 'strcat' [-Wimplicit-function-declaration] 6 | x = strcat(a. a[0], c); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcat' 1 | #include <stdio.h> +++ |+#include <string.h> 2 | main.c:6:7: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch] 6 | x = strcat(a. a[0], c); | ^~~~~~ main.c:6:7: note: include '<string.h>' or provide a declaration of 'strcat' main.c:6:15: error: request for member 'a' in something not a structure or union 6 | x = strcat(a. a[0], c); | ^ main.c:6:23: error: passing argument 2 of 'strcat' makes pointer from integer without a cast [-Wint-conversion] 6 | x = strcat(a. a[0], c); | ^ | | | char main.c:6:23: note: expected 'const char *' but argument is of type 'char'
s622666399
p03860
C
#include <stdio.h> int main(){ char s[100], *x, a = "A", c = "C"; scanf("%s", s); x = strcat(a. a[0], c); printf("%s", x); return 0; }
main.c: In function 'main': main.c:4:24: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion] 4 | char s[100], *x, a = "A", c = "C"; | ^~~ main.c:4:33: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion] 4 | char s[100], *x, a = "A", c = "C"; | ^~~ main.c:6:7: error: implicit declaration of function 'strcat' [-Wimplicit-function-declaration] 6 | x = strcat(a. a[0], c); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcat' 1 | #include <stdio.h> +++ |+#include <string.h> 2 | main.c:6:7: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch] 6 | x = strcat(a. a[0], c); | ^~~~~~ main.c:6:7: note: include '<string.h>' or provide a declaration of 'strcat' main.c:6:15: error: request for member 'a' in something not a structure or union 6 | x = strcat(a. a[0], c); | ^ main.c:6:23: error: passing argument 2 of 'strcat' makes pointer from integer without a cast [-Wint-conversion] 6 | x = strcat(a. a[0], c); | ^ | | | char main.c:6:23: note: expected 'const char *' but argument is of type 'char'
s250746271
p03860
C
#include <stdio.h> int main(){ char s[100], x; scanf("%s", s); x = s[0]; printf("A" + "%c" + "C", s[0]); return 0; }
main.c: In function 'main': main.c:7:14: error: invalid operands to binary + (have 'char *' and 'char *') 7 | printf("A" + "%c" + "C", s[0]); | ~~~ ^ | | | | | char * | char *
s274004608
p03860
C
#include <stdio.h> int main(){ char s[100]; scanf("%s", s); printf("A" + "%s" + "C", s[0]); return 0; }
main.c: In function 'main': main.c:7:14: error: invalid operands to binary + (have 'char *' and 'char *') 7 | printf("A" + "%s" + "C", s[0]); | ~~~ ^ | | | | | char * | char *
s710846336
p03860
C
#include <stdio.h> int main(){ char s[100]; scanf("%s", s); printf("A" + %s + "C", s[0]); return 0; }
main.c: In function 'main': main.c:7:16: error: expected expression before '%' token 7 | printf("A" + %s + "C", s[0]); | ^
s647924464
p03860
C++
#include <bits/stdc++.h> using namespace std; int main () { string a,b,c; cin >> a >>b >>c; cout <<"A"+b.at(0)+"C"<<endl; }
a.cc: In function 'int main()': a.cc:6:23: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 6 | cout <<"A"+b.at(0)+"C"<<endl; | ~~~~~~~~~~~^~~~ | | | | | const char [2] | const char*
s930938770
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string A,x,C; cin >> A >> x >> C; cout << A.at(0) < x.at(0) < C.at(0) << endl; }
a.cc: In function 'int main()': a.cc:7:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ~~~~~~~~~~~~~~~ ^ ~~~~~~~ | | | | | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} | std::basic_ostream<char> a.cc:7:22: note: candidate: 'operator<(int, int)' (built-in) 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ~~~~~~~~~~~~~~~~^~~~~~~~~ a.cc:7:22: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:7:30: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:7:30: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:7:30: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cout << A.at(0) < x.at(0) < C.at(0) << endl; | ^ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template ar
s863006726
p03860
C++
#include <iostream> #include <vector> using namespace std; int main(){ int = a, b,c; cin >> a >> b >> c; if((a != 0) &&(a%c ==0) && (b%c == 0)){ cout << (b-a)/c +1 <<endl; } else if((a != 0) &&(a%c ==0) && (b%c != 0)){ cout << (b-a)/c+1 <<endl; } else if((a != 0) &&(a%c !=0) && (b%c == 0)){ cout <<(b-a)/c+1 << endl; } else if ((a != 0) &&(a%c !=0) && (b%c != 0)){ cout <<(b-a)/c <<endl; } else if ((a == 0) &&(b%c ==0)){ cout << (b/c) <<endl; } else if ((a==0)&&(b%c != 0)){ cout << (b/c) <<endl; } }
a.cc: In function 'int main()': a.cc:7:6: error: expected unqualified-id before '=' token 7 | int = a, b,c; | ^ a.cc:8:10: error: 'a' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:8:15: error: 'b' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:8:20: error: 'c' was not declared in this scope 8 | cin >> a >> b >> c; | ^
s868945552
p03860
C++
#include <iostream> #include <vector> using namespace std; int main(){ long long int = a, b,c; cin >> a >> b >> c; if((a != 0) &&(a%c ==0) && (b%c == 0)){ cout << (b-a)/c +1 <<endl; } else if((a != 0) &&(a%c ==0) && (b%c != 0)){ cout << (b-a)/c+1 <<endl; } else if((a != 0) &&(a%c !=0) && (b%c == 0)){ cout <<(b-a)/c+1 << endl; } else if ((a != 0) &&(a%c !=0) && (b%c != 0)){ cout <<(b-a)/c <<endl; } else if ((a == 0) &&(b%c ==0)){ cout << (b/c) <<endl; } else if ((a==0)&&(b%c != 0)){ cout << (b/c) <<endl; } }
a.cc: In function 'int main()': a.cc:7:16: error: expected unqualified-id before '=' token 7 | long long int = a, b,c; | ^ a.cc:8:10: error: 'a' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:8:15: error: 'b' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:8:20: error: 'c' was not declared in this scope 8 | cin >> a >> b >> c; | ^
s078451414
p03860
C++
#include <iostream> #include <vector> using namespace std; int main(){ int64_t = a, b,c; cin >> a >> b >> c; if((a != 0) &&(a%c ==0) && (b%c == 0)){ cout << (b-a)/c +1 <<endl; } else if((a != 0) &&(a%c ==0) && (b%c != 0)){ cout << (b-a)/c+1 <<endl; } else if((a != 0) &&(a%c !=0) && (b%c == 0)){ cout <<(b-a)/c+1 << endl; } else if ((a != 0) &&(a%c !=0) && (b%c != 0)){ cout <<(b-a)/c <<endl; } else if ((a == 0) &&(b%c ==0)){ cout << (b/c) <<endl; } else if ((a==0)&&(b%C != 0)){ cout << (b/c) <<endl; } }
a.cc: In function 'int main()': a.cc:7:11: error: expected unqualified-id before '=' token 7 | int64_t = a, b,c; | ^ a.cc:8:10: error: 'a' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:8:15: error: 'b' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:8:20: error: 'c' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:25:25: error: 'C' was not declared in this scope 25 | else if ((a==0)&&(b%C != 0)){ | ^
s802018732
p03860
C++
#include <isotream> #include <vector> using namespace std; int main(){ string a,b,c; cin >> a >> b >> c; cout << "A" << b[0] << "C"; }
a.cc:1:10: fatal error: isotream: No such file or directory 1 | #include <isotream> | ^~~~~~~~~~ compilation terminated.
s171314526
p03860
Java
import java.util.*; import java.math.BigInteger; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); long a = sc.nextInt(); long b = sc.nextInt(); long x = sc.nextInt(); long count = 0; System.out.println(f(b,x) - f(a-1,x)); } public static long f(long n,long d){ if(n == -1){ return 0; }else{ return f2(n,d); } } public static long f2(long n, long d){ for(long i=1;i<=n;i++){ if(i%d == 0){ count += 1; } } return count; } }
Main.java:27: error: cannot find symbol count += 1; ^ symbol: variable count location: class Main Main.java:30: error: cannot find symbol return count; ^ symbol: variable count location: class Main 2 errors
s118441480
p03860
C++
#include <iostream> #include <string.h> using namespace std; int main() {string a="ATCoder"; string b="Contest"; string X; cin>>X; cout<<a[0]<<X[0]<<b[0]; return 0;
a.cc: In function 'int main()': a.cc:13:14: error: expected '}' at end of input 13 | return 0; | ^ a.cc:7:1: note: to match this '{' 7 | {string a="ATCoder"; | ^
s092896923
p03860
C++
#include <iostream> using namespace std; int main () { string a, b, c; cin<<a<<b<<c; cout<<"A"<<b[0]<<"C"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 6 | cin<<a<<b<<c; | ~~~^~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, 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/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c; | ^ 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:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:6:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | cin<<a<<b<<c; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:6:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = std::__cxx11::basic_string<char>]': a.cc:6:7: required from here 6 | cin<<a<<b<<c; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~
s272300658
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; char x; x = S.at(8) cout << 'A' + x + 'C' ; }
a.cc: In function 'int main()': a.cc:8:14: error: expected ';' before 'cout' 8 | x = S.at(8) | ^ | ; 9 | cout << 'A' + x + 'C' ; | ~~~~
s217741325
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, x; cin >> a >> x; cout << "A" + x.at(0) + "C"; }
a.cc: In function 'int main()': a.cc:7:25: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 7 | cout << "A" + x.at(0) + "C"; | ~~~~~~~~~~~~~ ^ ~~~ | | | | const char* const char [2]
s505866514
p03860
C++
#include<iostream> using namespace std ; int main() { string S ; getline(cin,S) ; . cout<<"A"<<S.at(9)<<"C"<<endl ; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: expected primary-expression before '.' token 8 | . | ^
s551265094
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s1,s2,s3; cin >> s1 >> s2 >> s3; cout << 'A' << s2.at(0) << 'C' << endl; ]
a.cc: In function 'int main()': a.cc:7:1: error: expected primary-expression before ']' token 7 | ] | ^ a.cc:7:2: error: expected '}' at end of input 7 | ] | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s359202141
p03860
C++
#include<bits/stdc++.h> string a; int main(){ cin>>a>>a; cout<<'A'<<a[0]<<'C'<<endl; }
a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'? 2 | string a; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin>>a>>a; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, 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:4:6: error: 'a' was not declared in this scope 4 | cin>>a>>a; | ^ a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | cout<<'A'<<a[0]<<'C'<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:5:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 5 | cout<<'A'<<a[0]<<'C'<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s328364646
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<string> x(3); cin >> x.at(0) >> x.at(1) >> x.at(2); string str=x.at(1); cout <<"A"<< str.at(0);<<"C" << endl; }
a.cc: In function 'int main()': a.cc:9:26: error: expected primary-expression before '<<' token 9 | cout <<"A"<< str.at(0);<<"C" << endl; | ^~
s702991808
p03860
C++
#include<<bits/stdc++.h> using namespace std; int main(){ string = A,x,B; cin >> A >> x >> B; cout << A+x+B<< endl; cout << A +x.at(0) + B << endl; }
a.cc:1:9: fatal error: <bits/stdc++.h: No such file or directory 1 | #include<<bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s514661031
p03860
C++
#include<<bits/stdc++.h> using namespace std; int main(){ string = A,x,B; cin >> A >> x >> B; cout << A+x+B<< endl; cout << A +x.at(0) + B << endl; }
a.cc:1:9: fatal error: <bits/stdc++.h: No such file or directory 1 | #include<<bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s815272453
p03860
C++
#include<<bits/stdc++.h> using namespace std; int main(){ string = A,x,B; cin >> A >> x >> B; cout << A+x+B<< endl; cout << A +x.at(0) + B << endl;
a.cc:1:9: fatal error: <bits/stdc++.h: No such file or directory 1 | #include<<bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s078543722
p03860
C++
#include<iostream> #include <string> #include <algorithm> using namespace std; int main(){ string A, X, C; cin >> A >> X >> C; transform(X[0], X[1], X[0], ::toupper); cout << A[0] << X[0] << C[0] << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of '_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = char; _OIter = char; _UnaryOperation = int (*)(int) noexcept]': a.cc:8:12: required from here 8 | transform(X[0], X[1], X[0], ::toupper); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4220:9: error: invalid type argument of unary '*' (have 'char') 4220 | *__result = __unary_op(*__first); | ^~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4220:32: error: invalid type argument of unary '*' (have 'char') 4220 | *__result = __unary_op(*__first); | ^~~~~~~~
s821867168
p03860
C++
#include<iostream> using namespace std; int main(){ string A, X, C; cin >> A >> X >> C; transform(X[0], X[1], X[0], ::toupper); cout << A[0] << X[0] << C[0] << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'transform' was not declared in this scope 6 | transform(X[0], X[1], X[0], ::toupper); | ^~~~~~~~~
s427066187
p03860
C++
#include<iostreram> using namespace std; int main(){ string A, X, C; cin >> A >> X >> C; transform(X[0], X[1], X[0], ::toupper); cout << A[0] << X[0] << C[0] << endl; return 0; }
a.cc:1:9: fatal error: iostreram: No such file or directory 1 | #include<iostreram> | ^~~~~~~~~~~ compilation terminated.
s303353011
p03860
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0;i < (n); ++i) using namespace std; int main(){ stirng a,b,c; cin >> a >> b >> c; cout << a[0]+b[0]+c[0] << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'stirng' was not declared in this scope 7 | stirng a,b,c; | ^~~~~~ a.cc:8:10: error: 'a' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:8:15: error: 'b' was not declared in this scope 8 | cin >> a >> b >> c; | ^ a.cc:8:20: error: 'c' was not declared in this scope 8 | cin >> a >> b >> c; | ^
s668373929
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; // ここにプログラムを追記 cout << A << S.at(0) << C << endl; }
a.cc: In function 'int main()': a.cc:9:10: error: 'A' was not declared in this scope 9 | cout << A << S.at(0) << C << endl; | ^ a.cc:9:26: error: 'C' was not declared in this scope 9 | cout << A << S.at(0) << C << endl; | ^
s247637499
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { char S; cin >> S; // ここにプログラムを追記 if (S == 'a' || S == 'i' || S == 'u' || S == 'e' || S == 'o') { cout << vowel << endl; } else { cout << consonant << endl; } }
a.cc: In function 'int main()': a.cc:10:10: error: 'vowel' was not declared in this scope 10 | cout << vowel << endl; | ^~~~~ a.cc:13:9: error: 'consonant' was not declared in this scope 13 | cout << consonant << endl; | ^~~~~~~~~
s835199221
p03860
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; cout << A << S.at(0) << C << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'A' was not declared in this scope 8 | cout << A << S.at(0) << C << endl; | ^ a.cc:8:29: error: 'C' was not declared in this scope 8 | cout << A << S.at(0) << C << endl; | ^
s598337469
p03860
C++
#include<iostream> using namespace std; int main(void){ string s[]; for(int i = 0; i < 3; i++){ cin >> s[i]; } for(int i = 0; i < 3; i++){ cout << s[i][0]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:10: error: array size missing in 's' 5 | string s[]; | ^
s985954040
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b,c; cin >> a >> b >> c;); // 変数sで入力を一行受け取る cout << a.at(0) << b.at(0) << c.at(0) << endl; }
a.cc: In function 'int main()': a.cc:6:22: error: expected primary-expression before ')' token 6 | cin >> a >> b >> c;); // 変数sで入力を一行受け取る | ^
s026851438
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string A, X, C; cin >> A >> X >> C; cout << A.at(0) << X.at(0) << C.at(0) }
a.cc: In function 'int main()': a.cc:7:41: error: expected ';' before '}' token 7 | cout << A.at(0) << X.at(0) << C.at(0) | ^ | ; 8 | } | ~
s570626024
p03860
Java
public static void main(String[] args) { InputReader in = new StreamInputReader(System.in); PrintWriter out = new PrintWriter(System.out); run(in, out); } public static void run(InputReader in, PrintWriter out) { Solver solver = new TaskC(); solver.solve(1, in, out); Exit.exit(in, out); } }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) Main.java:12: error: class, interface, enum, or record expected } ^ 2 errors
s104745971
p03860
Java
import java.util.Scanner; public static void main(String[] args) { Scanner x=new Scanner(System.in); String s,s2,s3; s=x.next(); s2=x.next(); s3=x.next(); System.out.printf("%s%s%s\n", s.charAt(0),s2.charAt(0),s3.charAt(0)); }
Main.java:3: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s866265460
p03860
Java
import java.util.Scanner; public class JavaApplication7 { public static void main(String[] args) { Scanner x=new Scanner(System.in); String s,s2,s3; s=x.next(); s2=x.next(); s3=x.next(); System.out.printf("%s%s%s\n", s.charAt(0),s2.charAt(0),s3.charAt(0)); } }
Main.java:2: error: class JavaApplication7 is public, should be declared in a file named JavaApplication7.java public class JavaApplication7 { ^ 1 error
s929235988
p03860
Java
package javaapplication7; import java.util.Scanner; public class JavaApplication7 { public static void main(String[] args) { Scanner x=new Scanner(System.in); String s,s2,s3; s=x.next(); s2=x.next(); s3=x.next(); System.out.printf("%s%s%s\n", s.charAt(0),s2.charAt(0),s3.charAt(0)); } }
Main.java:3: error: class JavaApplication7 is public, should be declared in a file named JavaApplication7.java public class JavaApplication7 { ^ 1 error
s351054507
p03860
Java
package m; import java.util.Scanner; public class m{ public static void main(String[] args) { Scanner x =new Scanner(System.in); String s,s2,s3,c,z,v; s=x.next(); s2=x.next(); s3=x.next(); c=s.toUpperCase(); z=s2.toUpperCase(); v=s3.toUpperCase(); System.out.printf("%s%s%s\n",c.charAt(0),z.charAt(0),v.charAt(0)); } }
Main.java:3: error: class m is public, should be declared in a file named m.java public class m{ ^ 1 error
s242695558
p03860
Java
import java.util.Scanner; public class m { public static void main(String[] args) { Scanner x =new Scanner(System.in); String s,s2,s3,c,z,v; s=x.next(); s2=x.next(); s3=x.next(); c=s.toUpperCase(); z=s2.toUpperCase(); v=s3.toUpperCase(); System.out.printf("%s%s%s\n",c.charAt(0),z.charAt(0),v.charAt(0)); } }
Main.java:2: error: class m is public, should be declared in a file named m.java public class m { ^ 1 error
s508605675
p03860
Java
import java.util.Scanner; public class JavaApplication4 { public static void main(String[] args) { Scanner x =new Scanner(System.in); String s,s2,s3,c,z,v; s=x.next(); s2=x.next(); s3=x.next(); c=s.toUpperCase(); z=s2.toUpperCase(); v=s3.toUpperCase(); System.out.printf("%s%s%s\n",c.charAt(0),z.charAt(0),v.charAt(0)); } }
Main.java:2: error: class JavaApplication4 is public, should be declared in a file named JavaApplication4.java public class JavaApplication4 { ^ 1 error
s571063195
p03860
Java
package javaapplication4; import java.util.Scanner; public class JavaApplication4 { public static void main(String[] args) { Scanner x =new Scanner(System.in); String s,s2,s3,c,z,v; s=x.next(); s2=x.next(); s3=x.next(); c=s.toUpperCase(); z=s2.toUpperCase(); v=s3.toUpperCase(); System.out.printf("%s%s%s\n",c.charAt(0),z.charAt(0),v.charAt(0)); } }
Main.java:3: error: class JavaApplication4 is public, should be declared in a file named JavaApplication4.java public class JavaApplication4 { ^ 1 error
s994381404
p03860
Java
package javaapplication4; import java.util.Scanner; public class JavaApplication4 { public static void main(String[] args) { Scanner x =new Scanner(System.in); String s,s2,s3; s=x.next(); s2=x.next(); s3=x.next(); System.out.printf("%s%s%s\n",s.charAt(0),s2.charAt(0),s3.charAt(0)); } }
Main.java:3: error: class JavaApplication4 is public, should be declared in a file named JavaApplication4.java public class JavaApplication4 { ^ 1 error
s623841676
p03860
Java
package javaapplication4; import java.util.Scanner; public class JavaApplication4 { public static void main(String[] args) { Scanner x =new Scanner(System.in); String s,s2,s3; s=x.next(); s2=x.next(); s3=x.next(); System.out.printf("%s%s%s\n",s.charAt(0),s2.charAt(0),s3.charAt(0)); } }
Main.java:3: error: class JavaApplication4 is public, should be declared in a file named JavaApplication4.java public class JavaApplication4 { ^ 1 error
s940415901
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { int N = 3 for(int i = 0; i < N; i++ ){ string s; cin >> s; if (i = 1){ char x = s.at(0); cout << 'A' << x << 'C' << endl; } } }
a.cc: In function 'int main()': a.cc:6:3: error: expected ',' or ';' before 'for' 6 | for(int i = 0; i < N; i++ ){ | ^~~ a.cc:6:18: error: 'i' was not declared in this scope 6 | for(int i = 0; i < N; i++ ){ | ^
s077640220
p03860
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; cout<<A<<b[0]<<C<<endl; }
a.cc: In function 'int main()': a.cc:6:11: error: 'A' was not declared in this scope 6 | cout<<A<<b[0]<<C<<endl; | ^ a.cc:6:20: error: 'C' was not declared in this scope 6 | cout<<A<<b[0]<<C<<endl; | ^
s244795452
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b,c; cin >>a>>b>>c; cout <<a.at(0)<<b.at(0)<<c.at(0) }
a.cc: In function 'int main()': a.cc:7:35: error: expected ';' before '}' token 7 | cout <<a.at(0)<<b.at(0)<<c.at(0) | ^ | ; 8 | } | ~
s704698910
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a; cin <<a; cout <<'A' << a.at(8) <<'C' <<endl; }
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 6 | cin <<a; | ~~~ ^~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:6:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | cin <<a; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:6:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin <<a; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduct
s342253851
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; getline(cin, S); cout << 'A' << S.at(8) << C <<endl; }
a.cc: In function 'int main()': a.cc:8:29: error: 'C' was not declared in this scope 8 | cout << 'A' << S.at(8) << C <<endl; | ^
s321308762
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, s, c; cin >> a >> s >> c; cout << a.at(0) s.at(0) c.at(0) << endl; }
a.cc: In function 'int main()': a.cc:6:18: error: expected ';' before 's' 6 | cout << a.at(0) s.at(0) c.at(0) << endl; | ^~ | ;
s180934010
p03860
Java
import java.io.*; import java.util.*; public class Candies{ public static int numOfOperations(int[] candies, int maxCount){ int excessCandies; int opCost = 0; for (int i = 0; i < candies.length - 1; i ++){ excessCandies = candies[i] + candies[i + 1] - maxCount; if (excessCandies <= 0) continue; else{ opCost += excessCandies; if (excessCandies < candies[i + 1]){ candies[i + 1] -= excessCandies; } else{ candies[i] -= excessCandies - candies[i + 1]; candies[i + 1] = 0; } } } return opCost; } public static void main(String args[]){ Scanner sc = new Scanner(System.in); int numOfBoxes = sc.nextInt(); int maxCount = sc.nextInt(); sc.nextLine(); String[] arr = sc.nextLine().split(" "); int[] candies = new int[arr.length]; for (int i = 0; i < arr.length; i ++){ candies[i] = Integer.parseInt(arr[i]); } System.out.println(numOfOperations(candies, maxCount)); } }
Main.java:3: error: class Candies is public, should be declared in a file named Candies.java public class Candies{ ^ 1 error
s168164515
p03860
C++
#include<bits/stdc++.h> int main() { int n; int x; cin >> n; cin >> x; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int answer = 0; for (int i = 0; i < n; i++) { if (arr[i] > x) { answer = answer + (arr[i] - x); } } for (int i = 0; i < n - 1; i++) { if (arr[i] + arr[i + 1] > x) { answer = answer + ((x - arr[i]) < 0 ? arr[i + 1] + arr[i] - x : arr[i] + arr[i + 1] - x); arr[i + 1] = x - arr[i] < 0 ? 0 : arr[i + 1] - x; if (arr[i + 1] == 0) { arr[i] = x; } } } cout << answer << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> n; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, 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:27:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 27 | cout << answer << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:27:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 27 | cout << answer << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s580750402
p03860
C++
#include<bits/stdc++.h> # define ll long long using namespace std; int main(){ ll n,x; cin >> n >> x; ll a[n]; ll sum;ll ans; for ( int i = 0 ; i < n ;i++){ cin >> a[i]; } if ( a[0] > x ) { ans += a[0] - x; a[0] = x; } sum = a[0]; for ( int i = 1 ; i < n ; i++){ sum += a[i]; if (sum > x){ ans += sum-x; a[i] -= sum-x; sum = x; } sum -= a[i-1]; } cout << ans; } }
a.cc:30:1: error: expected declaration before '}' token 30 | } | ^
s199403460
p03860
C++
#include<bits/stdc++.h> using namespace std; int main() { string a,b,c; cin >> a >> b >> c; char d == b.at(0); cout << 'A' +d + 'C' << endl; }
a.cc: In function 'int main()': a.cc:9:10: error: expected initializer before '==' token 9 | char d == b.at(0); | ^~ a.cc:11:16: error: 'd' was not declared in this scope 11 | cout << 'A' +d + 'C' << endl; | ^
s834112703
p03860
C++
#include<bits/stdc++.h> using namespace std; int main() { string a,b,c; cin >> a >>b >> c; char d == b.at(0); cout << 'A' << d << 'C' << endl; }
a.cc: In function 'int main()': a.cc:9:10: error: expected initializer before '==' token 9 | char d == b.at(0); | ^~ a.cc:11:18: error: 'd' was not declared in this scope 11 | cout << 'A' << d << 'C' << endl; | ^
s506451897
p03860
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.nextInt(); String x = s.substring(0,1).toUpperCase(); System.out.println("A"+x+"C"); } }
Main.java:5: error: incompatible types: int cannot be converted to String String s = sc.nextInt(); ^ 1 error
s804828905
p03860
C++
#include<bits/stdc++.h> using namespace std; int main(void) { string a,b.c; cin >> a >> b >> c; cout << a[0] << b[0] <<c[0] << endl; }
a.cc: In function 'int main()': a.cc:5:11: error: expected initializer before '.' token 5 | string a,b.c; | ^ a.cc:6:13: error: 'b' was not declared in this scope 6 | cin >> a >> b >> c; | ^ a.cc:6:18: error: 'c' was not declared in this scope 6 | cin >> a >> b >> c; | ^
s985868465
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ String a,b,c; cin >> a>>b>>c; cout <<a << b.at(0) <<c; }
a.cc: In function 'int main()': a.cc:5:3: error: 'String' was not declared in this scope 5 | String a,b,c; | ^~~~~~ a.cc:6:10: error: 'a' was not declared in this scope 6 | cin >> a>>b>>c; | ^ a.cc:6:13: error: 'b' was not declared in this scope 6 | cin >> a>>b>>c; | ^ a.cc:6:16: error: 'c' was not declared in this scope 6 | cin >> a>>b>>c; | ^
s831398485
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s ; cin >> s; cout << "A" << str.at(0) << "C"<< endl; }
a.cc: In function 'int main()': a.cc:9:18: error: 'str' was not declared in this scope; did you mean 'std'? 9 | cout << "A" << str.at(0) << "C"<< endl; | ^~~ | std
s880846144
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s ; cin >> s; char s = str.at(0); cout << "A" << s << "C"<< endl; }
a.cc: In function 'int main()': a.cc:9:8: error: conflicting declaration 'char s' 9 | char s = str.at(0); | ^ a.cc:5:10: note: previous declaration as 'std::string s' 5 | string s ; | ^ a.cc:9:12: error: 'str' was not declared in this scope; did you mean 'std'? 9 | char s = str.at(0); | ^~~ | std
s076975019
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() {  string s ; cin >> s; char s = str.at(0); cout << "A" << s << "C"<< endl; }
a.cc:5:1: error: extended character   is not valid in an identifier 5 |  string s ; | ^ a.cc: In function 'int main()': a.cc:5:1: error: '\U00003000string' was not declared in this scope 5 |  string s ; | ^~~~~~~~ a.cc:7:10: error: 's' was not declared in this scope 7 | cin >> s; | ^ a.cc:9:12: error: 'str' was not declared in this scope; did you mean 'std'? 9 | char s = str.at(0); | ^~~ | std
s637162709
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s, t, r; cin >> s, t, r; char x; x = t.at(0); cout << "A" + x + "C" << endl; }
a.cc: In function 'int main()': a.cc:9:19: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 9 | cout << "A" + x + "C" << endl; | ~~~~~~~ ^ ~~~ | | | | | const char [2] | const char*
s390816540
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; char x; x = s.at(0); cout << "A" + x + "C" << endl; }
a.cc: In function 'int main()': a.cc:9:19: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 9 | cout << "A" + x + "C" << endl; | ~~~~~~~ ^ ~~~ | | | | | const char [2] | const char*
s500395593
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; char x; x = s.at(0); cout << "A" + x + "C" << endl; }
a.cc: In function 'int main()': a.cc:10:21: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 10 | cout << "A" + x + "C" << endl; | ~~~~~~~ ^ ~~~ | | | | | const char [2] | const char*
s379301790
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string str1 = "0"; str1 = s.at(1); cout << "A" << str << "C" <<endl; }
a.cc: In function 'int main()': a.cc:9:18: error: 'str' was not declared in this scope; did you mean 'str1'? 9 | cout << "A" << str << "C" <<endl; | ^~~ | str1
s689381814
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string str"a"; str = s.at(1); cout << "A" << str << "C" <<endl; }
a.cc: In function 'int main()': a.cc:7:13: error: expected initializer before string constant 7 | string str"a"; | ^~~ a.cc:8:3: error: 'str' was not declared in this scope; did you mean 'std'? 8 | str = s.at(1); | ^~~ | std
s565341769
p03860
C++
print("A%sC"%input()[8])
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print("A%sC"%input()[8]) | ^
s279855746
p03860
C++
print("A%sC"%input()[8])
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print("A%sC"%input()[8]) | ^
s343669870
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; cout << "A" << s.at(0) << "C << endl; }
a.cc:8:29: warning: missing terminating " character 8 | cout << "A" << s.at(0) << "C << endl; | ^ a.cc:8:29: error: missing terminating " character 8 | cout << "A" << s.at(0) << "C << endl; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:10:1: error: expected primary-expression before '}' token 10 | } | ^
s638522938
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin << s; cout << "A" << s.at(0) << "C << endl; }
a.cc:8:29: warning: missing terminating " character 8 | cout << "A" << s.at(0) << "C << endl; | ^ a.cc:8:29: error: missing terminating " character 8 | cout << "A" << s.at(0) << "C << endl; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 6 | cin << s; | ~~~ ^~ ~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:6:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | cin << s; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/o
s446045649
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; cout << "A" << s.at(0) << "C << endl; }
a.cc:8:29: warning: missing terminating " character 8 | cout << "A" << s.at(0) << "C << endl; | ^ a.cc:8:29: error: missing terminating " character 8 | cout << "A" << s.at(0) << "C << endl; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:10:1: error: expected primary-expression before '}' token 10 | } | ^
s706606133
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin << s; cout << "AtCoder " << s.at(0) << " Contest " << endl; }
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 6 | cin << s; | ~~~ ^~ ~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:6:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | cin << s; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << s; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/
s470626694
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ int main(){ string s1,s2,s3; cin >> s1 >> s2 >> s3; cout << s1[0] << s2[0] << s3[0] << endl; }
a.cc: In function 'int main()': a.cc:6:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 6 | int main(){ | ^~ a.cc:6:13: note: remove parentheses to default-initialize a variable 6 | int main(){ | ^~ | -- a.cc:6:13: note: or replace parentheses with braces to value-initialize a variable a.cc:6:15: error: a function-definition is not allowed here before '{' token 6 | int main(){ | ^ a.cc:11:6: error: expected '}' at end of input 11 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s376383039
p03860
Java
public class Main { public static void main(String[] args) { Main main = new Main(); main.solve(); } private void solve() { Scanner sc = new Scanner(System.in); String A = sc.next(); String B = sc.next(); String C = sc.next(); System.out.println("A" + B.charAt(0) + "C"); } }
Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s311923977
p03860
C++
print("A%sC"%input()[8])
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print("A%sC"%input()[8]) | ^
s674287475
p03860
C++
#include <iostream> using namespace std; int main(void){ String name1, name2, name3, name0; cin >> name1 >> name2 >> name3; name0 = name1[0] + name2[0] + name3[0]; cout << name0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'String' was not declared in this scope 7 | String name1, name2, name3, name0; | ^~~~~~ a.cc:9:10: error: 'name1' was not declared in this scope 9 | cin >> name1 >> name2 >> name3; | ^~~~~ a.cc:9:19: error: 'name2' was not declared in this scope 9 | cin >> name1 >> name2 >> name3; | ^~~~~ a.cc:9:28: error: 'name3' was not declared in this scope 9 | cin >> name1 >> name2 >> name3; | ^~~~~ a.cc:11:3: error: 'name0' was not declared in this scope 11 | name0 = name1[0] + name2[0] + name3[0]; | ^~~~~
s131210112
p03860
C++
#include <iostream> using namespace: std; int main(void){ string FirstName, SecoundName, ThirdName; string abbreviation; //英語で略称 //入力を全て受け取る:C++はスペースごとに区切って入力される cin >> FirstName >> SecoundName >> ThirdName; abbreviation = FirstName[0] + SecoundName[0] + ThirdName[0]; cout << abbreviation; return 0; }
a.cc:3:16: error: expected identifier before ':' token 3 | using namespace: std; | ^ a.cc:3:16: error: expected ';' before ':' token 3 | using namespace: std; | ^ | ; a.cc:3:16: error: expected unqualified-id before ':' token a.cc: In function 'int main()': a.cc:6:3: error: 'string' was not declared in this scope 6 | string FirstName, SecoundName, ThirdName; | ^~~~~~ a.cc:6:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included 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: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:7:9: error: expected ';' before 'abbreviation' 7 | string abbreviation; //英語で略称 | ^~~~~~~~~~~~~ | ; a.cc:10:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | cin >> FirstName >> SecoundName >> ThirdName; | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:10:10: error: 'FirstName' was not declared in this scope 10 | cin >> FirstName >> SecoundName >> ThirdName; | ^~~~~~~~~ a.cc:10:23: error: 'SecoundName' was not declared in this scope 10 | cin >> FirstName >> SecoundName >> ThirdName; | ^~~~~~~~~~~ a.cc:10:38: error: 'ThirdName' was not declared in this scope 10 | cin >> FirstName >> SecoundName >> ThirdName; | ^~~~~~~~~ a.cc:12:3: error: 'abbreviation' was not declared in this scope 12 | abbreviation = FirstName[0] + SecoundName[0] + ThirdName[0]; | ^~~~~~~~~~~~ a.cc:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 14 | cout << abbreviation; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s624713677
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string c; cin >>c; char ch=c.at(0); cout<<"A"+ch+"C"<<endl; }
a.cc: In function 'int main()': a.cc:8:13: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 8 | cout<<"A"+ch+"C"<<endl; | ~~~~~~^~~~ | | | | | const char [2] | const char*
s012702566
p03860
C++
#include<iostream> using namespace std; int main() { string S; cin >> S; cout << "A" << S.at(0) << "B" endl; }
a.cc: In function 'int main()': a.cc:7:32: error: expected ';' before 'endl' 7 | cout << "A" << S.at(0) << "B" endl; | ^~~~~ | ;
s345402319
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s,t,r; cin >> s >> t >> r; if ( t < 1 || t > 100 ) { cout << "error" << endl; exit(0); } for ( int i = 0 ; i < s.size() ; i++ ) { if ( i!=2 && isupper(s.at(i)) ) { cout << s.at(i); } } for ( int i = 0 ; i < t.size() ; i++ ) { if ( i==0 && isupper(t.at(i)) ) { cout << t.at(i); } } for ( int i = 0 ; i < r.size() ; i++ ) { if ( i==0 && isupper(r.at(i)) ) { cout << r.at(i); } } cout << endl; }
a.cc: In function 'int main()': a.cc:7:10: error: no match for 'operator<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 7 | if ( t < 1 || t > 100 ) { | ~ ^ ~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if ( t < 1 || t > 100 ) { | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | if ( t < 1 || t > 100 ) { | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if ( t < 1 || t > 100 ) { | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 7 | if ( t < 1 || t > 100 ) { | ^ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits,
s472757523
p03860
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S; string s; cin>>S>>s; cout<<A<<s[0]<<C<<endl; }
a.cc: In function 'int main()': a.cc:8:9: error: 'A' was not declared in this scope 8 | cout<<A<<s[0]<<C<<endl; | ^ a.cc:8:18: error: 'C' was not declared in this scope 8 | cout<<A<<s[0]<<C<<endl; | ^
s516691235
p03860
C++
package main import ( "fmt" "bufio" "os" "strings" ) func main(){ var scanner = bufio.NewScanner(os.Stdin) var strs []string if scanner.Scan() { strs = strings.Split(scanner.Text(), " ") } a,b,c := strs[0][0], strs[1][0], strs[2][0] fmt.Printf("%c%c%c", a,b,c) }
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~
s240886921
p03860
Java
import java.util.Scanner; calss Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String A=sc.next(); String B=sc.next(); String C=sc.next(); if(character.isUpperCase(B.charAt(0)){ A.subString(0)+B.subString(0)+C.subString(0); }else{ System.out.println("コンテストの略字を出力せよ"); } } }
Main.java:3: error: class, interface, enum, or record expected calss Main{ ^ Main.java:12: error: not a statement A.subString(0)+B.subString(0)+C.subString(0); ^ Main.java:4: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args){ ^ (use --enable-preview to enable unnamed classes) Main.java:11: error: ')' expected if(character.isUpperCase(B.charAt(0)){ ^ Main.java:17: error: class, interface, enum, or record expected } ^ 5 errors
s738970072
p03860
Java
package app; import java.util.Scanner; public class App { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); String AtCoder = sc.next(); String s = sc.next(); String Contest = sc.next(); String AsC = AtCoder.substring(0, 1) + s.substring(0, 1) + Contest.substring(0, 1); System.out.println(AsC); } }
Main.java:5: error: class App is public, should be declared in a file named App.java public class App { ^ 1 error