submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s263021859
p00019
C++
#include<string> #include <stdio.h> #include <math.h> #include <cctype> #include<queue> #include<stack> #include<cstdio> using namespace std; int main(){ long long int ans; int n; cin>>n; ans=1; for(int i=1;i<=n;i++){ ans*=i; } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'cin' was not declared in this scope 12 | cin>>n; | ^~~ a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 7 | #include<cstdio> +++ |+#include <iostream> 8 | using namespace std; a.cc:17:9: error: 'cout' was not declared in this scope 17 | cout<<ans<<endl; | ^~~~ a.cc:17:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:17:20: error: 'endl' was not declared in this scope 17 | cout<<ans<<endl; | ^~~~ a.cc:8:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 7 | #include<cstdio> +++ |+#include <ostream> 8 | using namespace std;
s785180915
p00019
C++
print(["1","1","2","6","24","120","720","5040","40320","362880","3628800","39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000","51090942171709440000"][int(input())])
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(["1","1","2","6","24","120","720","5040","40320","362880","3628800","39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000","51090942171709440000"][int(input())]) | ^
s628208032
p00019
C++
#include <iostream> using namespace std; int main () { int n, a=1,i; cin >> n: for(i=n;i>1;i--) { a *= n; } cout << a << endl; }
a.cc: In function 'int main()': a.cc:6:13: error: expected ';' before ':' token 6 | cin >> n: | ^ | ; a.cc:7:20: error: expected ';' before ')' token 7 | for(i=n;i>1;i--) { | ^ | ;
s298838577
p00019
C++
#include <iostream> using namespace std; int main () { int n, a=1,i; cin >> n: for(i=n;i>1;i--) { a *= n; } cout << a << endl; }
a.cc: In function 'int main()': a.cc:6:13: error: expected ';' before ':' token 6 | cin >> n: | ^ | ; a.cc:7:20: error: expected ';' before ')' token 7 | for(i=n;i>1;i--) { | ^ | ;
s763918045
p00019
C++
#include <iostream> int main(){ long long int ans = 1; int n; cin >> n; for(int i=1; i<=n; i++) ans*=i; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << ans << 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:9:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << ans << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s493793531
p00019
C++
void factorial(int n) { int answer = 1; for (int i = n; i != 0; i--) { answer *= i; } cout << answer << endl; }
a.cc: In function 'void factorial(int)': a.cc:8:5: error: 'cout' was not declared in this scope 8 | cout << answer << endl; | ^~~~ a.cc:8:23: error: 'endl' was not declared in this scope 8 | cout << answer << endl; | ^~~~
s309774058
p00019
C++
int factorial(int n) { int answer = 1; for (int i = n; i != 0; i--) { answer *= i; } std::cout << answer << std::endl; }
a.cc: In function 'int factorial(int)': a.cc:8:10: error: 'cout' is not a member of 'std' 8 | std::cout << answer << std::endl; | ^~~~ a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | int factorial(int n) { a.cc:8:33: error: 'endl' is not a member of 'std' 8 | std::cout << answer << std::endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | int factorial(int n) { a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type] 9 | } | ^
s611644191
p00019
C++
#include <iostream> using namespace std; int main(int argc, *char argv[]) { int answer = 1; int n = argv[1]; for (int i = n; i != 0; i--) { answer *= i; } cout << answer; return 0; }
a.cc:5:20: error: expected identifier before '*' token 5 | int main(int argc, *char argv[]) { | ^ a.cc:5:21: error: expected ',' or '...' before 'char' 5 | int main(int argc, *char argv[]) { | ^~~~ a.cc:5:5: warning: second argument of 'int main(int, int*)' should be 'char **' [-Wmain] 5 | int main(int argc, *char argv[]) { | ^~~~ a.cc: In function 'int main(int, int*)': a.cc:7:13: error: 'argv' was not declared in this scope; did you mean 'argc'? 7 | int n = argv[1]; | ^~~~ | argc
s647852367
p00019
C++
#include <iostream> using namespace std; int main() { long long answer = 1`; int n; cin >> n; for (int i = n; i != 0; i--) { answer *= i; } cout << answer; return 0; }
a.cc:6:25: error: stray '`' in program 6 | long long answer = 1`; | ^
s835511985
p00019
C++
#include <iostream> using namespace std; int main() { int n; int i; int anser = 1; cin >> n for (i = 1; i <= n; i++){ anser *= i; } cout << anser; return (0); }
a.cc: In function 'int main()': a.cc:10:17: error: expected ';' before 'for' 10 | cin >> n | ^ | ; 11 | 12 | for (i = 1; i <= n; i++){ | ~~~ a.cc:12:32: error: expected ';' before ')' token 12 | for (i = 1; i <= n; i++){ | ^ | ;
s017985150
p00019
C++
main = readLn >>= print . product . flip take [1..]
a.cc:1:48: error: too many decimal points in number 1 | main = readLn >>= print . product . flip take [1..] | ^~~ a.cc:1:1: error: 'main' does not name a type 1 | main = readLn >>= print . product . flip take [1..] | ^~~~
s792100815
p00019
C++
#include <cstdio> int main(void) { int n; int i; long sum; sum = 1; scanf("%d", &n); for (i = 1; i <= n; i++){ sum *= i; } printf("%d\n", sum); } return (0); }
a.cc:19:9: error: expected unqualified-id before 'return' 19 | return (0); | ^~~~~~ a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
s164149770
p00019
C++
#include <iostream> using namespace std; int main() { int n; long long int ans = 1; int num; cin >> n; for(int i = n+1; i>1; i--) { ans *= (i-1); } cout << ans << endl return 0; }
a.cc: In function 'int main()': a.cc:17:28: error: expected ';' before 'return' 17 | cout << ans << endl | ^ | ; 18 | 19 | return 0; | ~~~~~~
s752079701
p00019
C++
#include <iostream> using namespace std; int main() { int n long long ans; cin >> n; ans = 1; for (int i = 1; i <= n; i++){ ans *= i; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: expected initializer before 'long' 7 | long long ans; | ^~~~ a.cc:8:10: error: 'n' was not declared in this scope 8 | cin >> n; | ^ a.cc:9:3: error: 'ans' was not declared in this scope; did you mean 'abs'? 9 | ans = 1; | ^~~ | abs
s255299284
p00019
C++
import scala.io.StdIn._ object Main extends App { println((1 to readInt()).map(_.toLong).product) }
a.cc:1:1: error: 'import' does not name a type 1 | import scala.io.StdIn._ | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s966055752
p00019
C++
#include<iostream> #include<stdio.h> using namespace std; int factorial(int n) { return (n > 0 ? n*factorial(n - 1) : 1); } int main() { int n; scanf_s("%d", &n); printf("%d \n", factorial(n)); return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 14 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s988220046
p00019
C++
#include<iostream> #include<stdio.h> using namespace std; long long factorial(int n) { return (n > 0 ? n*factorial(n - 1) : 1); } int main() { int n; scanf_s("%d", &n); printf("%lld \n", factorial(n)); return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 14 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s053092603
p00019
C++
#include <stdio.h> int main(){ int n; int i; long long ans=1; cin >> n; for(i=0; i<n; i++){ ans = ans * (i+1); } cout << ans <<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | cin >> n; | ^~~ a.cc:12:9: error: 'cout' was not declared in this scope 12 | cout << ans <<endl; | ^~~~ a.cc:12:23: error: 'endl' was not declared in this scope 12 | cout << ans <<endl; | ^~~~
s880676512
p00019
C++
#include <stdio.h> int main(){ int n; int i; long long ans=1; cin >> n; for(i=0; i<n; i++){ ans = ans * (i+1); } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | cin >> n; | ^~~ a.cc:12:9: error: 'cout' was not declared in this scope 12 | cout << ans << endl; | ^~~~ a.cc:12:24: error: 'endl' was not declared in this scope 12 | cout << ans << endl; | ^~~~
s943073651
p00019
C++
#include <iostream> #include<math.h> #include<iomanip> #include<vector> #include<algorithm> #include<functional> using namespace std; int main() { int a=0,b=0,i=0; cin >> a; b=1; for(i=0;i<a;i++){ b=b*(i+1); }#include <iostream> #include<math.h> #include<iomanip> #include<vector> #include<algorithm> #include<functional> using namespace std; int main() { int a=0,b=0,i=0; cin >> a; b=1; for(i=0;i<a;i++){ b=b*(i+1); } cout << b << endl; //cout << endl; return 0; } cout << b << endl; //cout << endl; return 0; }
a.cc:17:6: error: stray '#' in program 17 | }#include <iostream> | ^ a.cc: In function 'int main()': a.cc:17:7: error: 'include' was not declared in this scope 17 | }#include <iostream> | ^~~~~~~ a.cc:17:24: error: expected primary-expression before '>' token 17 | }#include <iostream> | ^ a.cc:23:1: error: expected primary-expression before 'using' 23 | using namespace std; | ^~~~~ a.cc:25:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 25 | int main() | ^~ a.cc:25:9: note: remove parentheses to default-initialize a variable 25 | int main() | ^~ | -- a.cc:25:9: note: or replace parentheses with braces to value-initialize a variable a.cc:26:1: error: a function-definition is not allowed here before '{' token 26 | { | ^
s893053150
p00019
C++
#include<cstdio> using namespace std; int ans = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; int main(){ int a; scanf("%d", &a); printf("%d\n", ans[a - 1]); return 0; }
a.cc:4:98: error: expected '}' before numeric constant 4 | int ans = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; | ~ ^~~~~~~~~~~ a.cc:4:5: error: scalar object 'ans' requires one element in initializer 4 | int ans = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; | ^~~ a.cc:4:98: error: expected ',' or ';' before numeric constant 4 | int ans = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; | ^~~~~~~~~~~ a.cc:4:216: error: expected declaration before '}' token 4 | int ans = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; | ^
s884534752
p00019
C++
#include<cstdio> using namespace std; int ans[] = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; int main(){ int a; scanf("%d", &a); printf("%d\n", ans[a - 1]); return 0; }
a.cc:4:100: error: expected '}' before numeric constant 4 | int ans[] = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; | ~ ^~~~~~~~~~~ a.cc:4:88: error: narrowing conversion of '6.2270208e+9' from 'double' to 'int' [-Wnarrowing] 4 | int ans[] = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; | ^~~~~~~~~~~ a.cc:4:218: error: expected declaration before '}' token 4 | int ans[] = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000}; | ^
s881113464
p00019
C++
#include<bits/stdc++.h> using namespace std; int main() { long long n,rslt; rslt=1; cin>>n; for(i=1;i<=n;i++) rslt*=i; cout<<rslt<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:8: error: 'i' was not declared in this scope 8 | for(i=1;i<=n;i++) | ^
s931723711
p00019
C++
#include <iostream> #include <cmath> using namespace std; int main() { int a; cin >> a; out << tgamma(a+1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'out' was not declared in this scope 7 | out << tgamma(a+1) << endl; | ^~~
s209338224
p00019
C++
#include <iostream> #include <cmath> using namespace std; int main() { int a = 0; cin >> a; cout << (long long)tgamma((long int)n + 1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:39: error: 'n' was not declared in this scope 7 | cout << (long long)tgamma((long int)n + 1) << endl; | ^
s505745095
p00019
C++
#include<iostream> using namespace std; int main(){ unsigned __int64 a=1; int i,n; cin>>n; for(i=n;i>0;i--){ a*=i; } cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:4:26: error: expected initializer before 'a' 4 | unsigned __int64 a=1; | ^ a.cc:8:17: error: 'a' was not declared in this scope 8 | a*=i; | ^ a.cc:10:15: error: 'a' was not declared in this scope 10 | cout<<a<<endl; | ^
s480329541
p00019
C++
#include <iostream> using namespace std; int main(){ int n; unsigned long ans = 1; cin >> n; for (int i = 1; i <= n; i++) { ans *= i } cout << i << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:17: error: expected ';' before '}' token 9 | ans *= i | ^ | ; 10 | } | ~ a.cc:11:13: error: 'i' was not declared in this scope 11 | cout << i << endl; | ^
s947341838
p00019
C++
#include <iostream> using namespace std; int main(){ int n; unsigned long ans = 1; cin >> n; for (int i = 1; i <= n; i++) { ans *= i } cout << i << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:17: error: expected ';' before '}' token 9 | ans *= i | ^ | ; 10 | } | ~ a.cc:11:13: error: 'i' was not declared in this scope 11 | cout << i << endl; | ^
s278925890
p00019
C++
#include <bits/stdc++.h> int fact(int x) { if(x == 1) return 1; else return x * fact(x-1); } int main() { int n; cin >> n; cout << fact(n) << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | int n; 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:10:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout << fact(n) << 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:10:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout << fact(n) << 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) | ^~~~
s516937552
p00019
C++
//#define scanf_s scanf //#define gets_s gets #include <stdio.h> #include <string> #include <iostream> #include <math.h> using namespace std; #define MAX 81 #define _MAX 100 #define ABC 26 int main(void) { int n, ans = 1; scanf_s("%d", &n); for (int i = 1; i <= n; ++i) { ans *= i; } printf("%d\n", ans); }
a.cc: In function 'int main()': a.cc:14:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 14 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s877311458
p00019
C++
#include<stdio.h> int ke(int x) { if(x == 1)return 1; else return x*ke(x-1); } int main() { int a; cin >> a; printf("%d",ke(a)); return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'cin' was not declared in this scope 10 | cin >> a; | ^~~
s234267640
p00019
C++
#include <iostream> using namespace std; int fact(int n){ if(n==2) return 2; else return n*fact(n-1); } int main() { int n,f; cin >> n; f=fact(n); cout <<< f << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:10: error: expected primary-expression before '<' token 14 | cout <<< f << endl; | ^ a.cc:14:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 14 | cout <<< f << endl; | ~~^~~~~~~
s679838704
p00019
C++
#include <iostream> using namespace std; int main() { int n; unsigned long long int re = 1; cin >> n; while(n >= 2) { re *= n; n--; } cout << re << endl; return 0; }#include <iostream> using namespace std; int main() { int n; int re = 1; cin >> n; while(n >= 2) { re *= n; n--; } cout << re << endl; return 0; }
a.cc:19:2: error: stray '#' in program 19 | }#include <iostream> | ^ a.cc:19:3: error: 'include' does not name a type 19 | }#include <iostream> | ^~~~~~~ a.cc:23:5: error: redefinition of 'int main()' 23 | int main() { | ^~~~ a.cc:5:5: note: 'int main()' previously defined here 5 | int main() { | ^~~~
s356721549
p00019
C++
#include <iostream> using namespace std; int main() { int n; unsigned long long int re = 1; cin >> n; while(n >= 2) { re *= n; n--; } cout << re << endl; return 0; }#include <iostream> using namespace std; int main() { int n; int re = 1; cin >> n; while(n >= 2) { re *= n; n--; } cout << re << endl; return 0; }
a.cc:19:2: error: stray '#' in program 19 | }#include <iostream> | ^ a.cc:19:3: error: 'include' does not name a type 19 | }#include <iostream> | ^~~~~~~ a.cc:23:5: error: redefinition of 'int main()' 23 | int main() { | ^~~~ a.cc:5:5: note: 'int main()' previously defined here 5 | int main() { | ^~~~
s755173614
p00019
C++
#include <iostream> int main() { long long fact[21] = {}; fact[0] = 1; int a; cin >> a; for (int i = 1; i <= a; ++i) fact[i] = i * fact[i - 1]; cout << fact[a] << endl; }
a.cc: In function 'int main()': a.cc:7:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | int a; cin >> a; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << fact[a] << 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:9:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << fact[a] << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s560954089
p00019
C++
#include<iostream> #include<stdio.h> #include<string> #include<math.h> #include<iomanip> #include<algorithm> #include<string.h> #include<cctype> #include<map> #include<set> #include<vector> #include<sstream> #include<stack> using namespace std; int main() { long long int n; long long result=1; cin>>n while(n--) { result*=n; } cout<<result<<endl; //while(1); return 0; }
a.cc: In function 'int main()': a.cc:22:10: error: expected ';' before 'while' 22 | cin>>n | ^ | ; 23 | while(n--) | ~~~~~
s957734843
p00019
C++
include<iostream> #include<cstdio> #include<algorithm> using namespace std; int main(){ int n; int ans=1; for(int i=1;i<=n;i++){ ans*=i; } printf(" %d",ans); return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:3: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std' 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/stdio.h:34, from /usr/include/c++/14/cstdio:42, from a.cc:2: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:65: /usr/include/c++/14/bits/stl_iterator_base_types.h:125:67: error: 'ptrdiff_t' does not name a type 125 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_types.h:1:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' +++ |+#include <cstddef> 1 | // Types used in iterator implementation -*- C++ -*- /usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: error: 'ptrdiff_t' does not name a type 214 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: error: 'ptrdiff_t' does not name a type 225 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' In file included from /usr/include/c++/14/bits/stl_algobase.h:66: /usr/include/c++/14/bits/stl_iterator_base_funcs.h:112:5: error: 'ptrdiff_t' does not name a type 112 | ptrdiff_t | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:66:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 65 | #include <debug/assertions.h> +++ |+#include <cstddef> 66 | #include <bits/stl_iterator_base_types.h> /usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: error: 'ptrdiff_t' does not name a type 118 | ptrdiff_t | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' In file included from /usr/include/c++/14/bits/stl_iterator.h:67, from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/ptr_traits.h:156:47: error: 'ptrdiff_t' was not declared in this scope 15
s076511401
p00019
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; long k=1; cin>>n; int i; for(i=1;i<=n;i++){ k*=(long)i; } cout<<k<<endl; return(0); } Compile Error Logs: You are not authorized to see the message. Status Judge: 1/1 C++ CPU: 00.00 sec Memory: 3056 KB Length: 190 B 2017-03-15 15:43 2017-03-15 15:43 Results for testcases Case # Verdict CPU Time Memory In Out Case Name Case #1: : Accepted 00.00 sec 3056 KB < prev | 1 / 1 | next > : Accepted 00.00 sec 3056 KB Judge Input #1 ( | ) Judge Output #1 ( | ) Comments Under Construction. Categories Free Tags
a.cc:28:6: error: stray '#' in program 28 | Case # Verdict CPU Time Memory In Out Case Name | ^ a.cc:29:7: error: stray '#' in program 29 | Case #1: : Accepted 00.00 sec 3056 KB | ^ a.cc:37:13: error: stray '#' in program 37 | Judge Input #1 ( | ) Judge Output #1 ( | ) | ^ a.cc:37:37: error: stray '#' in program 37 | Judge Input #1 ( | ) Judge Output #1 ( | ) | ^ a.cc:20:1: error: 'Compile' does not name a type 20 | Compile Error Logs: | ^~~~~~~
s196687356
p00019
C++
#include <cstdio> using namespace std; long long fact(int n){ if(n==2) return 2; return fact(n-1)*n; } int main(void){ int n; cin >> n; cout << fact(n) << endl; }
a.cc: In function 'int main()': a.cc:10:3: error: 'cin' was not declared in this scope 10 | cin >> n; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <cstdio> +++ |+#include <iostream> 2 | using namespace std; a.cc:11:3: error: 'cout' was not declared in this scope 11 | cout << fact(n) << endl; | ^~~~ a.cc:11:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:22: error: 'endl' was not declared in this scope 11 | cout << fact(n) << endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #include <cstdio> +++ |+#include <ostream> 2 | using namespace std;
s692377659
p00019
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; typedef long long ll; int main(){ ll n,ans=1; cin >> n; while(n--){ ans*=n; } cout << n << endl return 0; }
a.cc: In function 'int main()': a.cc:12:22: error: expected ';' before 'return' 12 | cout << n << endl | ^ | ; 13 | return 0; | ~~~~~~
s052895182
p00019
C++
#include<iostream> using namespace std; int main() { int n; cin>>n; doublr ans=1; for(int i=1;i<=n;i++) ans*=i; cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'doublr' was not declared in this scope; did you mean 'double'? 6 | doublr ans=1; | ^~~~~~ | double a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 8 | ans*=i; | ^~~ | abs a.cc:9:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 9 | cout<<ans<<endl; | ^~~ | abs
s049178452
p00019
C++
#include <stdio.h> int main(void){ int n,i,P; P=1; n<=1&&n<=20 scanf("%d",&n); for(i=1;i<=n;i++){ P=P*i; } printf("%d\n",P); return 0; }
a.cc: In function 'int main()': a.cc:5:15: error: expected ';' before 'scanf' 5 | n<=1&&n<=20 | ^ | ; 6 | scanf("%d",&n); | ~~~~~
s860784036
p00019
C++
#include<iostream> n,i; main(){ std::cin>>n; for(i=n;--n;) i*=n; std::cout<<i;}
a.cc:2:1: error: 'n' does not name a type 2 | n,i; | ^ a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:4:13: error: 'n' was not declared in this scope 4 | std::cin>>n; | ^ a.cc:5:7: error: 'i' was not declared in this scope 5 | for(i=n;--n;) | ^ a.cc:7:14: error: 'i' was not declared in this scope 7 | std::cout<<i;} | ^
s721174135
p00019
C++
#include<iostream> main(n,i){ std::cin>>n; for(i=n;--n;) i*=n; std::cout<<i;}
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(n,i){ | ^
s344767942
p00019
C++
#include <iostream> main(){long long n,i;for(std::cin>>n,i=n;i>1;n*=--i);std::cout<<n<<endl;}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){long long n,i;for(std::cin>>n,i=n;i>1;n*=--i);std::cout<<n<<endl;} | ^~~~ a.cc: In function 'int main()': a.cc:2:68: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 2 | main(){long long n,i;for(std::cin>>n,i=n;i>1;n*=--i);std::cout<<n<<endl;} | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s602218437
p00019
C++
#include<iostream> using namespace std; int main() { int n; __int64 ans=1; cin >> n ; for(int i=1;i<=n;i++) { ans*=i; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 8 | __int64 ans=1; | ^~~~~~~ | __int64_t a.cc:14:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 14 | ans*=i; | ^~~ | abs a.cc:17:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 17 | cout << ans << endl; | ^~~ | abs
s441732417
p00019
C++
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println(fact(sc.nextInt())); } private static long fact(long n) { if (n == 1) return 1; return fact(n - 1) * n; } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:15: error: expected ':' before 'static' 5 | public static void main(String args[]) | ^~~~~~~ | : a.cc:5:33: error: 'String' has not been declared 5 | public static void main(String args[]) | ^~~~~~ a.cc:11:16: error: expected ':' before 'static' 11 | private static long fact(long n) | ^~~~~~~ | : a.cc:16:2: error: expected ';' after class definition 16 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:7:17: error: 'Scanner' was not declared in this scope 7 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:9:17: error: 'System' was not declared in this scope 9 | System.out.println(fact(sc.nextInt())); | ^~~~~~ a.cc:9:41: error: 'sc' was not declared in this scope 9 | System.out.println(fact(sc.nextInt())); | ^~
s611570832
p00019
C++
nclude<iostream> using namespace std; int function(int n){ if(n > 1) return n * function(n-1); else return 1; } int main(){ int n; cin >> n; cout << function(n) << endl; }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:12:3: error: 'cin' was not declared in this scope 12 | cin >> n; | ^~~ a.cc:13:3: error: 'cout' was not declared in this scope 13 | cout << function(n) << endl; | ^~~~ a.cc:13:26: error: 'endl' was not declared in this scope 13 | cout << function(n) << endl; | ^~~~
s617058445
p00019
C++
nclude<iostream> using namespace std; int function(int n){ if(n > 1) return n * function(n-1); else return 1; } int main(){ int n; cin >> n; cout << function(n) << endl; }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:12:3: error: 'cin' was not declared in this scope 12 | cin >> n; | ^~~ a.cc:13:3: error: 'cout' was not declared in this scope 13 | cout << function(n) << endl; | ^~~~ a.cc:13:26: error: 'endl' was not declared in this scope 13 | cout << function(n) << endl; | ^~~~
s367546964
p00019
C++
nclude<iostream> using namespace std; int function(int n){ if(n > 1) return n * function(n-1); else return 1; } int main(){ int n; cin >> n; cout << function(n) << endl; return 0; }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:12:3: error: 'cin' was not declared in this scope 12 | cin >> n; | ^~~ a.cc:13:3: error: 'cout' was not declared in this scope 13 | cout << function(n) << endl; | ^~~~ a.cc:13:26: error: 'endl' was not declared in this scope 13 | cout << function(n) << endl; | ^~~~
s263894763
p00019
C++
#include<stdio.h> #include<stdlib.h> int main(){ int cnt ,i,kaeru; double num; char total[10]; gets(total); kaeru= atoi(total); num = 1; for( i = kaeru ; i >= 1 ; i-- ){ num *= i; } printf("%f",num); return 0; }
a.cc: In function 'int main()': a.cc:8:1: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(total); | ^~~~ | getw
s608382632
p00019
C++
n;main(i){for(n=scanf("%d",&i);i;n*=i--);printf("%d\n",n);}
a.cc:1:1: error: 'n' does not name a type 1 | n;main(i){for(n=scanf("%d",&i);i;n*=i--);printf("%d\n",n);} | ^ a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token 1 | n;main(i){for(n=scanf("%d",&i);i;n*=i--);printf("%d\n",n);} | ^
s882915839
p00019
C++
c;main(){c=!puts("2432902008176640000");}
a.cc:1:1: error: 'c' does not name a type 1 | c;main(){c=!puts("2432902008176640000");} | ^ a.cc:1:3: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | c;main(){c=!puts("2432902008176640000");} | ^~~~ a.cc: In function 'int main()': a.cc:1:10: error: 'c' was not declared in this scope 1 | c;main(){c=!puts("2432902008176640000");} | ^ a.cc:1:13: error: 'puts' was not declared in this scope 1 | c;main(){c=!puts("2432902008176640000");} | ^~~~
s294683351
p00019
C++
void main(){printf("%d\n",120);}
a.cc:1:1: error: '::main' must return 'int' 1 | void main(){printf("%d\n",120);} | ^~~~ a.cc: In function 'int main()': a.cc:1:13: error: 'printf' was not declared in this scope 1 | void main(){printf("%d\n",120);} | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | void main(){printf("%d\n",120);}
s095589410
p00019
C++
main(){printf("%d\n",120);return 0;}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){printf("%d\n",120);return 0;} | ^~~~ a.cc: In function 'int main()': a.cc:1:8: error: 'printf' was not declared in this scope 1 | main(){printf("%d\n",120);return 0;} | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | main(){printf("%d\n",120);return 0;}
s701140350
p00019
C++
#include <iostream> using namespace std; __int64 fact(int num); int input_int(); int main() { cout << fact(input_int()) << endl; return (0); } __int64 fact(int num) { return ((num == 1) ? 1 : fact(num - 1) * num); } int input_int(void) { int in; cin >> in; return (in); }
a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'? 4 | __int64 fact(int num); | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:9:17: error: 'fact' was not declared in this scope 9 | cout << fact(input_int()) << endl; | ^~~~ a.cc: At global scope: a.cc:13:1: error: '__int64' does not name a type; did you mean '__int64_t'? 13 | __int64 fact(int num) { return ((num == 1) ? 1 : fact(num - 1) * num); } | ^~~~~~~ | __int64_t
s919840238
p00019
C++
#include <iostream> using namespace std; __int64 fact(int num); int input_int(); int main() { cout << fact(input_int()) << endl; return (0); } __int64 fact(int num) { return ((num == 1) ? 1 : fact(num - 1) * num); } int input_int() { int in; cin >> in; return (in); }
a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'? 4 | __int64 fact(int num); | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:9:17: error: 'fact' was not declared in this scope 9 | cout << fact(input_int()) << endl; | ^~~~ a.cc: At global scope: a.cc:13:1: error: '__int64' does not name a type; did you mean '__int64_t'? 13 | __int64 fact(int num) { return ((num == 1) ? 1 : fact(num - 1) * num); } | ^~~~~~~ | __int64_t
s102835945
p00019
C++
main(){puts("2432902008176640000");}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){puts("2432902008176640000");} | ^~~~ a.cc: In function 'int main()': a.cc:1:8: error: 'puts' was not declared in this scope 1 | main(){puts("2432902008176640000");} | ^~~~
s524155846
p00019
C++
main(i){printf("%d\n",rand(3));}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i){printf("%d\n",rand(3));} | ^
s574243420
p00019
C++
main(i){printf("%d\n",rand());}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i){printf("%d\n",rand());} | ^
s461307451
p00019
C++
nclude<iostream> using namespace std; int main(){ int n,i,ans; while(cin >> n){ ans=1; for(i=0;i<n;i++){ ans=ans*(n-i); } cout << ans << endl; } }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | while(cin >> n){ | ^~~ a.cc:15:5: error: 'cout' was not declared in this scope 15 | cout << ans << endl; | ^~~~ a.cc:15:20: error: 'endl' was not declared in this scope 15 | cout << ans << endl; | ^~~~
s457390193
p00019
C++
nclude<iostream> using namespace std; int main(){ int n,i; long long asn; while(cin >> n){ ans=1; for(i=0;i<n;i++){ ans=ans*(n-i); } cout << ans << endl; } }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | while(cin >> n){ | ^~~ a.cc:10:3: error: 'ans' was not declared in this scope; did you mean 'asn'? 10 | ans=1; | ^~~ | asn a.cc:16:5: error: 'cout' was not declared in this scope 16 | cout << ans << endl; | ^~~~ a.cc:16:20: error: 'endl' was not declared in this scope 16 | cout << ans << endl; | ^~~~
s709474898
p00019
C++
#include<iostream> using namespace std; int main(){ int n,i; long long asn; while(cin >> n){ ans=1; for(i=0;i<n;i++){ ans=ans*(n-i); } cout << ans << endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: 'ans' was not declared in this scope; did you mean 'asn'? 10 | ans=1; | ^~~ | asn
s743516509
p00019
C++
#include <iostream> using namespace std; int main(void) { int a,b; cin >> a; for(i=a;i>0;i--) { b*=i; } cout << b; return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: 'i' was not declared in this scope 8 | for(i=a;i>0;i--) | ^
s417330004
p00019
C++
include<iostream> using namespace std; int main(){ int n,s=1; cin >> n; for(int i=0;n-i > 0;i++) s=s*(n-i); cout << s <<endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> n; | ^~~ a.cc:8:3: error: 'cout' was not declared in this scope 8 | cout << s <<endl; | ^~~~ a.cc:8:15: error: 'endl' was not declared in this scope 8 | cout << s <<endl; | ^~~~
s306823940
p00019
C++
#include<iostream> using namespace std; int main(){ int n; long long sum = 1; for(int i=1; i<=n; i++){ sum*=i; } sout <<sum<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'sout' was not declared in this scope 9 | sout <<sum<<endl; | ^~~~
s712141515
p00019
C++
#include<iostream> int main() { using namespace std; int num,factorial=1; cout<<"Enter the number: "; cin>>num; for(int i=1;i<=num;i++) { factorial=factorial*i; } cout<<<<factorial<<endl; cin.get(); return 0; }
a.cc: In function 'int main()': a.cc:16:15: error: expected primary-expression before '<<' token 16 | cout<<<<factorial<<endl; | ^~
s539442495
p00019
C++
#include <iostream> using namespace std; int main() { int n,fac=1; n<=20; cin>>n; for(int i=1;i<=num;i++) { fac=n*i; } cout<<fac<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:16: error: 'num' was not declared in this scope; did you mean 'enum'? 9 | for(int i=1;i<=num;i++) | ^~~ | enum
s142828147
p00019
C++
#include<iostream> __int64 fact( int n ) { if( n == 1 ) return 1; else return n * fact( n - 1 ); } int main() { int x; std::cin >> x; std::cout << fact( x ) << std::endl; return 0; }
a.cc:3:1: error: '__int64' does not name a type; did you mean '__int64_t'? 3 | __int64 fact( int n ) | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:13:22: error: 'fact' was not declared in this scope 13 | std::cout << fact( x ) << std::endl; | ^~~~
s269100900
p00019
C++
#include<iostream> using namespace std; int n,a,ans; int !(int x){ if(x<1){return 1;} if(x>=1){ a=!(x-1)*x; return a;}} int solve(){ cin>>n; ans=!(n); cout<<ans<<endl;}
a.cc:4:5: error: expected unqualified-id before '!' token 4 | int !(int x){ | ^ a.cc: In function 'int solve()': a.cc:13:17: warning: no return statement in function returning non-void [-Wreturn-type] 13 | cout<<ans<<endl;} | ^
s917226646
p00019
C++
#include<iostream> using namespase std; int main(){ int n; while(cin>>n){ long long pro = 1; for(int i=1;i<=n;i++){ pro*=i; } cout << pro << endl; } return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namespase' 2 | using namespase std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | while(cin>>n){ | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout << pro << 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:11:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout << pro << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s752705425
p00019
C++
#include<stdio.h> int fact(int n){ if(n>1) return n*fact(n-1); return 1; } main(){ int x; scanf("%d",&x) printf("%d\n",fact(x)); }
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:19: error: expected ';' before 'printf' 9 | scanf("%d",&x) | ^ | ; 10 | printf("%d\n",fact(x)); | ~~~~~~
s483579331
p00019
C++
#include<stdio.h>int fact(int n){ if(n>1) return n*fact(n-1); return 1;}main(){int x; scanf("%d",&x); printf("%d\n",fact(x));}
a.cc:1:22: warning: extra tokens at end of #include directive 1 | #include<stdio.h>int fact(int n){ if(n>1) return n*fact(n-1); return 1;}main(){int x; scanf("%d",&x); printf("%d\n",fact(x));} | ^~~~ a.cc:1:9: fatal error: stdio.h>in: No such file or directory 1 | #include<stdio.h>int fact(int n){ if(n>1) return n*fact(n-1); return 1;}main(){int x; scanf("%d",&x); printf("%d\n",fact(x));} | ^~~~~~~~~~~~ compilation terminated.
s570379995
p00019
C++
void main(a,i){ long long n=scanf("%d",&a); for(i=0;i++<a;)n*=i; printf("%llu\n",n); }
a.cc:1:6: error: variable or field 'main' declared void 1 | void main(a,i){ | ^~~~ a.cc:1:11: error: 'a' was not declared in this scope 1 | void main(a,i){ | ^ a.cc:1:13: error: 'i' was not declared in this scope 1 | void main(a,i){ | ^
s164363618
p00019
C++
int main(a,i){ long long n=scanf("%d",&a); for(i=0;i++<a;)n*=i; printf("%llu\n",n); return 0; }
a.cc:1:5: error: cannot declare '::main' to be a global variable 1 | int main(a,i){ | ^~~~ a.cc:1:10: error: 'a' was not declared in this scope 1 | int main(a,i){ | ^ a.cc:1:12: error: 'i' was not declared in this scope 1 | int main(a,i){ | ^ a.cc:1:13: error: expression list treated as compound expression in initializer [-fpermissive] 1 | int main(a,i){ | ^
s437031799
p00019
C++
#include<iostream> using namespace std; long long ans=1; long long factorial(int n){ // 再起関数 if(n==1){ return ans; }else{ ans = n*factorial(n-1); } } int main(){ int n; cin >> n; if(n<0){ cout << "計算できません。" << endl; }else if(n==0 || n==1){ cout << 1 << endl; }else{ cout << factorial(n) << endl; // 再起 return 0; }
a.cc: In function 'int main()': a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:14:11: note: to match this '{' 14 | int main(){ | ^ a.cc: In function 'long long int factorial(int)': a.cc:10:9: warning: control reaches end of non-void function [-Wreturn-type] 10 | ans = n*factorial(n-1); | ~~~~^~~~~~~~~~~~~~~~~~
s328405065
p00019
C++
#include<iostream> using namespace std; long long factorial(long long n){ // 再帰関数 if(n==1){ return 1; }else{ return n*=factorial(n-1); } } int main(){ int n; cin >> n; if(n>=1 && n<=20){ cout << factorial(n) << endl; // 再帰 else{ cout << "計算できません。" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:19:3: error: expected '}' before 'else' 19 | else{ | ^~~~ a.cc:16:20: note: to match this '{' 16 | if(n>=1 && n<=20){ | ^
s876512294
p00019
C++
main(){puts("2432902008176640000");return 0;}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){puts("2432902008176640000");return 0;} | ^~~~ a.cc: In function 'int main()': a.cc:1:8: error: 'puts' was not declared in this scope 1 | main(){puts("2432902008176640000");return 0;} | ^~~~
s744460337
p00019
C++
main(){printf("2432902008176640000\n");return;}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){printf("2432902008176640000\n");return;} | ^~~~ a.cc: In function 'int main()': a.cc:1:8: error: 'printf' was not declared in this scope 1 | main(){printf("2432902008176640000\n");return;} | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | main(){printf("2432902008176640000\n");return;} a.cc:1:40: error: return-statement with no value, in function returning 'int' [-fpermissive] 1 | main(){printf("2432902008176640000\n");return;} | ^~~~~~
s235670900
p00019
C++
main(){printf("2432902008176640000\n");return 0;}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){printf("2432902008176640000\n");return 0;} | ^~~~ a.cc: In function 'int main()': a.cc:1:8: error: 'printf' was not declared in this scope 1 | main(){printf("2432902008176640000\n");return 0;} | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | main(){printf("2432902008176640000\n");return 0;}
s325535143
p00019
C++
main()printf("2432902008176640000\n");return 0;
a.cc:1:7: error: expected constructor, destructor, or type conversion before 'printf' 1 | main()printf("2432902008176640000\n");return 0; | ^~~~~~ a.cc:1:39: error: expected unqualified-id before 'return' 1 | main()printf("2432902008176640000\n");return 0; | ^~~~~~
s075193357
p00019
C++
main(){printf("2432902008176640000\n");}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){printf("2432902008176640000\n");} | ^~~~ a.cc: In function 'int main()': a.cc:1:8: error: 'printf' was not declared in this scope 1 | main(){printf("2432902008176640000\n");} | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | main(){printf("2432902008176640000\n");}
s715297435
p00019
C++
#include <stdio.h> typedef long long LL; LL a[21]; void init(){ a[1] = 1; for (int i=2; i<=20; ++i){ a[i] = a[i-1]*i; } } void solve(LL n){ printf("%lld\n", a[n]); } int main (){ __int64 n; init(); while (~scanf("%lld", &n)){ solve(n); } return 0; }
a.cc: In function 'int main()': a.cc:19:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 19 | __int64 n; | ^~~~~~~ | __int64_t a.cc:21:32: error: 'n' was not declared in this scope 21 | while (~scanf("%lld", &n)){ | ^
s416891878
p00019
C++
#include <iostream> using namespace std; factorial(int n){ return (--n) ? factorial(n):1; } int main(void){ int n; cin >> n; cout << factorial(n) << endl; return 0; }
a.cc:3:1: error: ISO C++ forbids declaration of 'factorial' with no type [-fpermissive] 3 | factorial(int n){ | ^~~~~~~~~
s125418297
p00019
C++
#include <iostream> using namespace std; factorial(int n){ return ((--n) ? factorial(n):1); } int main(void){ int n; cin >> n; cout << factorial(n) << endl; return 0; }
a.cc:3:1: error: ISO C++ forbids declaration of 'factorial' with no type [-fpermissive] 3 | factorial(int n){ | ^~~~~~~~~
s351485178
p00019
C++
#include <iostream> using namespace std; int factorial(int n){ if(n > 0){ return n*factorial(n-1); } else { return 1; } } int main(){ int n; cin>>n; if(n<1||n<20)break; cout<< factorial(n)<<endl; }
a.cc: In function 'int main()': a.cc:15:16: error: break statement not within loop or switch 15 | if(n<1||n<20)break; | ^~~~~
s718355513
p00019
C++
#include <iostream> using namespace std; long factorial(long n){ if(n > 0){ return n*factorial(n-1); } else { return 1; } } int main(){ long n; cin>>n; cout<< factorial(n)>>endl; }
a.cc: In function 'int main()': a.cc:16:22: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 16 | cout<< factorial(n)>>endl; | ~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:16:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout<< factorial(n)>>endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:16:24: note: couldn't deduce template parameter '_IntegerType' 16 | cout<< factorial(n)>>endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:16:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout<< factorial(n)>>endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:16:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout<< factorial(n)>>endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:16:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout<< factorial(n)>>endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:16:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout<< factorial(n)>>endl; | ^~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:16:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout<< factorial(n)>>endl; | ^~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:16:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout<< factorial(n)>>endl; | ^~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: a.cc:16:24: note: couldn't deduce template parameter '_Tp' 16 | cout<< factorial(n)>>endl; | ^~~~
s851045702
p00019
C++
#include<iostream> using namespace std; int main() { cin>>n; int ans = 1; for(int i=1; i<=n; i++) ans *= i; printf("%d\n", ans); }
a.cc: In function 'int main()': a.cc:4:6: error: 'n' was not declared in this scope 4 | cin>>n; | ^
s098150274
p00019
C++
#include<iostream> using namespace std; int main() { cin>>n; int ans = 1; for(int i=1; i<=n; i++) ans *= i; cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:4:6: error: 'n' was not declared in this scope 4 | cin>>n; | ^
s520671317
p00019
C++
#include <iostream> using namespace std; int fact(n){ if(n == 1) return 1; else return n * fact(n-1); } int main(){ int n; cin >> n; cout << fact(n) << endl; return 0; }
a.cc:5:10: error: 'n' was not declared in this scope 5 | int fact(n){ | ^ a.cc: In function 'int main()': a.cc:13:17: error: 'fact' cannot be used as a function 13 | cout << fact(n) << endl; | ~~~~^~~
s308015917
p00019
C++
#include <iostream> using namespace std; int main(){ int n; while(cin >> n){ for(int i=1;n<1;n--) i *= n; cout << i; } return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'i' was not declared in this scope 9 | cout << i; | ^
s989852669
p00019
C++
using namespace std; int f(int x){ if(x==0){ return 1; }else{ return x*f(x-1); } } int main(){ long int a,r; while(cin >> a){ r=f(a); cout << r << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'cin' was not declared in this scope 13 | while(cin >> a){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:15:17: error: 'cout' was not declared in this scope 15 | cout << r << endl; | ^~~~ a.cc:15:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:15:30: error: 'endl' was not declared in this scope 15 | cout << r << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std;
s628733711
p00019
C++
p (1..gets.to_i).inject(:*)
a.cc:1:4: error: too many decimal points in number 1 | p (1..gets.to_i).inject(:*) | ^~~~~~~~~~~~ a.cc:1:3: error: expected constructor, destructor, or type conversion before '(' token 1 | p (1..gets.to_i).inject(:*) | ^
s987389991
p00019
C++
#include<iostream> main(){ int i,n,r; r=1; cin>>n; for(i=1;i<=n;++i){ r=r*i; } cout<<r<<endl; }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:10:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout<<r<<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:10:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout<<r<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s525493569
p00019
C++
#include<iostream> using namespace std; main(){ int i,n; r; r=1; cin>>n; for(i=1;i<=n;++i){ r=r*i; } cout<<r<<endl; }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'r' was not declared in this scope 6 | r; | ^
s643957865
p00019
C++
#include <iostream> #include <cstdlib> #include <windows.h> using namespace std; float factorial(float n); int main() { long long n; do { cout<< "Enter value : " ; cin >> n; }while(n>20); cout<< factorial(n) << endl; return 0; } float factorial(float n) { int x; long long sum=1; for(x=1; x<=n; x++) { sum = sum*x; } return sum; }
a.cc:3:10: fatal error: windows.h: No such file or directory 3 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s486530083
p00019
C++
#include <iostream> #include <cstdlib> #include <windows.h> using namespace std; float factorial(float n); int main() { float n; do { cout<< "Enter value : " ; cin >> n; }while(n>20); cout<< factorial(n) << endl; return 0; } float factorial(float n) { int x; float sum=1; for(x=1; x<=n; x++) { sum = sum*x; } return sum; }
a.cc:3:10: fatal error: windows.h: No such file or directory 3 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s126968274
p00019
C++
#include <iostream> #include <cstdlib> #include <windows.h> using namespace std; int main() { long long n; do { cout<< "Enter value : " ; cin >> n; }while(n>20); int x; long long sum=1; for(x=1; x<=n; x++) { sum = sum*x; } cout<< sum << endl; return 0; }
a.cc:3:10: fatal error: windows.h: No such file or directory 3 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s762832809
p00019
C++
#include <iostream> #include <cstdlib> #include <windows.h> using namespace std; int main() { long long n; do { cin >> n; }while(n>20); int x; long long sum=1; for(x=1; x<=n; x++) { sum = sum*x; } cout<< sum << endl; return 0; }
a.cc:3:10: fatal error: windows.h: No such file or directory 3 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s660428365
p00019
C++
#include <iostream> #include <cstdlib> #include <windows.h> using namespace std; int main() { long long n; do { cin >> n; }while(n>20); int x; long long sum=1; for(x=1; x<=n; x++) { sum = sum*x; } cout<< sum << endl; return 0; }
a.cc:3:10: fatal error: windows.h: No such file or directory 3 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.