submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s795295872
p03835
C++
#include <bits/stdc++.h> using namespace std; int main (){ int K, S; cin >> K >> S; if(S <= K){ ans = (S + 2)*(S + 1)*S/6; } if(S > K && S <= 2*K){ ans = (S + 2)*(S + 1)*S/6 - 1; for(int X = K+1;X < S;X++){ ans -= (S-X+1)*(S-X)/2; } if(S > 2*K && S <= 3*K){ (S - 2*K + 2)*(S - 2*K ...
a.cc: In function 'int main()': a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 8 | ans = (S + 2)*(S + 1)*S/6; | ^~~ | abs a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | ans = (S + 2)*(S + 1)*S/6 - 1; | ^~~ |...
s749916283
p03835
C++
#include <bits/stdc++.h> using namespace std; int main (){ int K, S; cin >> K >> S; if(S <= K){ ans = (S + 2)*(S + 1)*S/6; } if(S > K && S <= 2*K){ ans = (S + 2)*(S + 1)*S/6 - 1; for(X = K+1;X < S;X++){ ans -= (S-X+1)*(S-X)/2; } if(S > 2*K && S <= 3*K){ (S - 2*K + 2)*(S - 2*K + 1)...
a.cc: In function 'int main()': a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 8 | ans = (S + 2)*(S + 1)*S/6; | ^~~ | abs a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | ans = (S + 2)*(S + 1)*S/6 - 1; | ^~~ |...
s933619825
p03835
C++
#include <bits/stdc++.h> using namespace std; int main (){ int K, S; cin >> K >> S; int ans = 1; while(S > 0){ ans *= (K + S) / S; S-- } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:10:8: error: expected ';' before '}' token 10 | S-- | ^ | ; 11 | } | ~
s529036398
p03835
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int A = sc.nextInt(); int B = sc.nextInt(); int count = 0; int total = 0; for(int i = 1; i <= N; i++){ int n=i; count = 0; ...
Main.java:16: error: '.class' expected while(int n>0){ ^ Main.java:16: error: not a statement while(int n>0){ ^ Main.java:16: error: ';' expected while(int n>0){ ^ 3 errors
s610028831
p03835
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int s = sc.nextInt(); int count = 0; for(int x=0; x<=k; x++){ for(int y=0; y<=k; y++){ int z=s-x-y; if(0=<z && z<=k){ ...
Main.java:15: error: > or ',' expected if(0=<z && z<=k){ ^ 1 error
s432638527
p03835
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int s = sc.nextInt(); int count = 0; for(int x=0; x<=k; x++){ for(int y=0; y<=k; y++){ z=s-x-y; if(x+y+z==k){ c...
Main.java:14: error: cannot find symbol z=s-x-y; ^ symbol: variable z location: class Main Main.java:15: error: cannot find symbol if(x+y+z==k){ ^ symbol: variable z location: class Main 2 errors
s377990091
p03835
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int s = sc.nextInt(); int count = 0; for(int x=0; x<=k; x++){ for(int y=0; y<=k; y++){ z=s-x-y; if(x+y+z==k){ c...
Main.java:16: error: ';' expected count++ ^ 1 error
s148827132
p03835
Java
import java.util.*; public class Main(){ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int s = sc.nextInt(); int count = 0; for(int x=0; x<=k; x++){ for(int y=0; y<=k; y++){ for(int z=0; z<=k; z++){ if(x+y...
Main.java:3: error: '{' expected public class Main(){ ^ 1 error
s906518594
p03835
C++
#include<iostream> #include<algorithm> #include<math.h> #include<string> using namespace std; int main() { int K, S; cin K >> S; int i, j, k; int count = 0; for (i = 0; i <= K; ++i) { for (j = 0; j <= K; ++j) { for (k = 0; k <= K;++k) { if (i + j + k == S)++count; } } } cout << count << endl; r...
a.cc: In function 'int main()': a.cc:9:12: error: expected ';' before 'K' 9 | cin K >> S; | ^~ | ; a.cc:22:18: error: expected '}' at end of input 22 | return 0; | ^ a.cc:7:12: note: to match this '{' 7 | int main() { | ...
s260901532
p03835
C++
#include<iostream> using namespace std; int main(){ int k,s;cin>>k>>s; int n=0; for(int i=0;i<=k;i++){ for(int j=0;j<=k;j++){ // for(int l=0;l<=k;l++){ // if(i+j+l==s)n++; // } int z=s-x-y; if(0<=x&&x<=k){ n++; } } } cout<<n<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:15: error: 'x' was not declared in this scope 12 | int z=s-x-y; | ^ a.cc:12:17: error: 'y' was not declared in this scope 12 | int z=s-x-y; | ^
s793757854
p03835
C++
#include <iostream> using namespace std; int main(){ int K, S, ans = 0; cin >> K >> S; for ( int i = 0; i <= K; i++ ){ for ( int j = 0; j <= K; j++ ){ if ( s - i - j >= 0 && s - i - j <= k){ ans ++; } } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:10:12: error: 's' was not declared in this scope 10 | if ( s - i - j >= 0 && s - i - j <= k){ | ^ a.cc:10:43: error: 'k' was not declared in this scope 10 | if ( s - i - j >= 0 && s - i - j <= k){ | ^...
s631308049
p03835
C++
#include <iostream> using namespace std; int main(){ int K, S, ans = 0; cin >> k >> s; for ( int i = 0; i <= K; i++ ){ for ( int j = 0; j <= K; j++ ){ for ( int k = 0; k <= K; k++ ){ if ( i + j + k == S ){ ans ++; break; } } if ( i + j > S ) break; ...
a.cc: In function 'int main()': a.cc:6:10: error: 'k' was not declared in this scope 6 | cin >> k >> s; | ^ a.cc:6:15: error: 's' was not declared in this scope 6 | cin >> k >> s; | ^
s996090471
p03835
C++
#include <iostream> using namespace std; int main(){ int K, S, ans = 0; cin >> k >> s; for ( int i = 0; i <= K; i++ ){ for ( int j = 0; j <= K; j++ ){ for ( int k = 0; k <= K; k++ ){ if ( i + j + k == S ){ ans ++; breakl } } if ( i + j > S ) break; ...
a.cc: In function 'int main()': a.cc:6:10: error: 'k' was not declared in this scope 6 | cin >> k >> s; | ^ a.cc:6:15: error: 's' was not declared in this scope 6 | cin >> k >> s; | ^ a.cc:13:11: error: 'breakl' was not declared in this scope 13 | breakl ...
s436077368
p03835
C++
#include<iostream> using namespace std; int main(){ int k,s; int ans=0; cin >> k,s; for(int x=0;x<=k;x++){ for(int y=0;y<=k;y++){ int z = s - x - y; if(0 <= z && z <= k) ans++; } } } cout << ans; }
a.cc:17:5: error: 'cout' does not name a type 17 | cout << ans; | ^~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s825226843
p03835
C++
#include<iostream> using namespace std; int main(){ int k,s; int ans=0; cin >> k,s; for(int x=0;x<=k;x++){ for(int y=0;y<=k;y++){ int z = s - x - y; if(0 <= z && z <= k) ans++; } } } } cout << ans; }
a.cc:16:5: error: expected declaration before '}' token 16 | } | ^ a.cc:18:5: error: 'cout' does not name a type 18 | cout << ans; | ^~~~ a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s965247602
p03835
C++
#include<bits/stdc++.h> using namespace std; int main(){ int k,s; cin>>k>>s; int ans=0; for(int x=0;x<=k;x++){ for(int y=0;y<=k;y++){ int z=s-x-y; if(z>=0&&z<=k)}{ ans++; } } } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:21: error: expected primary-expression before '}' token 12 | if(z>=0&&z<=k)}{ | ^ a.cc: At global scope: a.cc:18:3: error: 'cout' does not name a type 18 | cout<<ans<<endl; | ^~~~ a.cc:20:3: error: expected unqualified-id before 're...
s754424610
p03835
Java
package zen; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class SumOfThree { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] s = br.readLine().split(" "); int ...
Main.java:7: error: class SumOfThree is public, should be declared in a file named SumOfThree.java public class SumOfThree { ^ 1 error
s615113652
p03835
Java
import java.util.*; public class SumOfThree { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int max = sc.nextInt(); int sumAns = sc.nextInt(); int result = countSumOfThree(max, sumAns); System.out.println(result); sc.close(); } ...
Main.java:3: error: class SumOfThree is public, should be declared in a file named SumOfThree.java public class SumOfThree { ^ 1 error
s127645802
p03835
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <cstdlib> #include <thread> #include <chrono> #include <queue> using namespace std; int main(void){ int k = 0; int s = 0; cin >> k >> s; int counter = 0; for(int p=0;i<k;p++){ for(int q=0;j<k;q++){ for(int...
a.cc: In function 'int main()': a.cc:18:21: error: 'i' was not declared in this scope 18 | for(int p=0;i<k;p++){ | ^ a.cc:19:29: error: 'j' was not declared in this scope 19 | for(int q=0;j<k;q++){ | ^
s587222116
p03835
C++
k, s = map(int, input().split(' ')) ans = 0 for x in range(k+1): for y in range(k+1): if -1 < (s - x - y) < k + 1: ans += 1 print(ans)
a.cc:1:1: error: 'k' does not name a type 1 | k, s = map(int, input().split(' ')) | ^
s528095636
p03835
C++
#include <iostream> using namespace std; int main(){ int K,S,X=0,Y=0,Z=0,sunadatyan=0; cin>>K>>S; /*for(int i=0;i<=S;i++){ if(K*3==S){ cout<<1; break; } if(S/i<=K||S%i==0){ sunadatyan[i]=sunadatyan[i]+i; }//ここまででK以下の数字だよ*/ for(int i=0;i<=K;i++){ for(int ii=0;i<=K;i++){ for(int iii=0;i<=K){ ...
a.cc: In function 'int main()': a.cc:16:43: error: expected ';' before ')' token 16 | for(int iii=0;i<=K){ | ^ | ;
s598418373
p03835
C++
#include<iostream> using namespace std; int main(){ int k,s; int cnt = 0; cin >> k >> s; for(int i = 0; i <= k; i++){ for(int j = 0; j <= k; j++){ if(s - i + j >=){ cnt++; } } } cout << cnt << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:12:28: error: expected primary-expression before ')' token 12 | if(s - i + j >=){ | ^
s580361820
p03835
C++
#include<iostream> using namespace std; int main(){ int k,s; int cnt = 0; for(int i = 0; i <= k; i++){ for(int j = 0; j <= k; j++){ if(s - i + j >=){ cnt++; } } } cin >> cnt >> s; return 0; }
a.cc: In function 'int main()': a.cc:10:28: error: expected primary-expression before ')' token 10 | if(s - i + j >=){ | ^
s560519806
p03835
C
#include<cstdio> int main(){ int K,S,p=0; scanf("%d%d",&K,&S); for(int i=0;i<=K;i++)for(int n=0;n<=K;n++)for(int j=0;j<=K;j++){if(i+n+j==S)p++;}printf("%d",p);return 0;}
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s126338718
p03835
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> using namespace std; int k,s; int main(){ cin >> k >> s; int count = 0; for(int i = 0; i <= k; i++){ for(int j = 0; j <= k; j++){ int l = s - i - j; if(0 <= l && l <= k) count++; } }...
a.cc:18:5: error: 'cout' does not name a type 18 | cout << count << endl; | ^~~~ a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s958469782
p03835
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> using namespace std; int k,s; int main(){ cin >> k >> s; int count = 0; for(int i = 0; i < k; i++){ for(int j = 0; j < k; j++){ for( l = 0; l < k; l++){ if(i + j + l == s) count++; } ...
a.cc: In function 'int main()': a.cc:13:18: error: 'l' was not declared in this scope 13 | for( l = 0; l < k; l++){ | ^
s054217339
p03835
C++
#include <iostream> using namespace std; int K,S; int main(){ cin >> K >> S; int ans = 0; for(int i=0;i<=K;i++){ for(int j=0;j<=K;j++){ if(0<=S-i-j && S-i-j-<=K) ans++; } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:10:28: error: expected primary-expression before '<=' token 10 | if(0<=S-i-j && S-i-j-<=K) ans++; | ^~
s814408051
p03835
C++
#include <bits/stdc++.h> using namespace std; int main() { int K,S; cin >> K >> S; int ans=0; for(int i=0;i<=K;i++) { for(int l=0;l<=K;l++) { if(S-l-i<=K) ans++; } } } cout << ans << endl; }
a.cc:16:3: error: 'cout' does not name a type 16 | cout << ans << endl; | ^~~~ a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s839661261
p03835
C++
#include<iostream> using namespace std; int K,S; int main() { cin >> K >> S; int ans = 0; for(int x=0;x<=K;++x){ if(S-x<K){ Y=S-x; }else{ Y=K; } for(int y=0;y<=Y;++y){ ...
a.cc: In function 'int main()': a.cc:13:25: error: 'Y' was not declared in this scope 13 | Y=S-x; | ^ a.cc:15:25: error: 'Y' was not declared in this scope 15 | Y=K; | ^ a.cc:17:32: error: 'Y' was not decla...
s442856245
p03835
C++
#include <iostream> using namespace std; int main() { int k, s; cin >> k >> s; int num = 0; for (int i = 0; i <= k; i++) { for (int j = i; j <= k; j++) { for (int u = j; u <= k; u++) { if (i + j + u == s) { if ((j == u && i != j) || (i == j && i ...
a.cc: In function 'int main()': a.cc:29:25: error: expected '}' at end of input 29 | cout << num << endl; | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s079823279
p03835
C++
#include<iostream> using namespace std; int main() { int K, S; cin >> K >> S; int score = 0; for(int a = 0; a <= 3*K; ++a){ for(int b = 0; b <= 3*K; ++b){ int c = S - a - b; if(0 <= c and z <= K) ++score; } } cout << score << endl; }
a.cc: In function 'int main()': a.cc:10:21: error: 'z' was not declared in this scope 10 | if(0 <= c and z <= K) ++score; | ^
s336502691
p03835
C++
#include<iostream> using namespace std; int main() { int K, S; cin >> K >> S; int score = 0; for(int a = 0; a <= 3*K; ++a){ for(int b = 0; b <= 3*K; ++b){ int c = S - x - y; if(0 <= c and z <= K) ++score; } } cout << score << endl; }
a.cc: In function 'int main()': a.cc:9:19: error: 'x' was not declared in this scope 9 | int c = S - x - y; | ^ a.cc:9:23: error: 'y' was not declared in this scope 9 | int c = S - x - y; | ^ a.cc:10:21: error: 'z' was not declared in this scope ...
s749090657
p03835
C++
#include<cstdio> #include<cmath> #include<cstring> #include<string> #include <cstring> #include <iostream> #include <algprithm> using namespace std; int main() { int K,S,X,Y,Z,ans,cnt = 0; scanf("%d%d",&K,&S); for(X = 0; X <= K; X++) for(Y = 0; Y <= K; Y++) { ans = S - X - Y; if(ans >= 0 && ans <= K) cnt++...
a.cc:7:10: fatal error: algprithm: No such file or directory 7 | #include <algprithm> | ^~~~~~~~~~~ compilation terminated.
s439370900
p03835
C++
Home Problem Status Contest User Group Forum Article Logout Martha Begin: 2018-09-22 14:30 CST 西南民族大学2018年新生题目1 End: 2018-11-11 14:30 CST 364:51:13 Elapsed: 364:51:13 Running Remaining: 835:08:46 Overview Problem Status Rank (364:51:12) 0 Comments Previou...
a.cc:14:13: error: invalid digit "9" in octal constant 14 | Begin: 2018-09-22 14:30 CST | ^~ a.cc:20:16: error: invalid digit "8" in octal constant 20 | Remaining: 835:08:46 | ^~ a.cc:34:5: error: extended character … is not valid in an identifier 34 | … | ^...
s151865434
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int K = scan.nextInt(); int S = scan.nextInt(); int a; int b; int x; int cnt = 0; int Z; for (a = 0; a <= K; x++) { if ...
Main.java:15: error: variable x might not have been initialized if (S - x < K) Z = S-x; ^ Main.java:17: error: variable Z might not have been initialized for (b = 0; b <= Z; b++) { ^ 2 errors
s408098703
p03835
C++
#include<iostream> using namespace std; int main(){ int K, S; cin >> K >> S; int i, j, k, /*count=0;*/count1=0, count3=0, count6=0; for(i=0; i<=K; i++){ for(j=i; j<=K; j++){ for(k=j; k<=K; k++){ // cout << i << j << k << endl; if(i+j+k==S){ count++; if(i==j && j==k) count1++; else if(i...
a.cc: In function 'int main()': a.cc:14:41: error: 'count' was not declared in this scope; did you mean 'count6'? 14 | count++; | ^~~~~ | count6
s948719553
p03835
C++
#include <iostream> #include <vector> using namespace std; int main() { int K,S; cin>>K>>S; int count=0; for(int X=0;X<=K;++X){ for(int Y=0;Y<=K;++Y){ int Z=S-X-Y; if(0<=Z && Z<=K) ++count } } cout<<count<<endl; }
a.cc: In function 'int main()': a.cc:14:16: error: expected ';' before '}' token 14 | ++count | ^ | ; 15 | } | ~
s743388820
p03835
C++
#include <iostream> #include <vector> using namespace std; int main() { int K,S; cin>>K>>S; int count=0; for(int X=0;X<=K;++X){ for(int Y=0;Y<=K;++Y){ for(int Z=0;Z<=K;++Z){ if(X+Y+Z=S) ++count; } } } cout<<count<<endl; }
a.cc: In function 'int main()': a.cc:13:15: error: lvalue required as left operand of assignment 13 | if(X+Y+Z=S) | ~~~^~
s360069543
p03835
C++
#include "bits/stdc++.h" #define rep(i,a,n) for(int i = (a);i < (n);i++) typedef long long ll; typedef unsigned long long ull; using namespace std; int main(){ int k,s,cnt = 0; cin >> a >> b >> c; rep(i,0,k){ rep(j,0,k){ rep(j,0,k){ if(i+j+k == s){ cnt++; ...
a.cc: In function 'int main()': a.cc:10:16: error: 'a' was not declared in this scope 10 | cin >> a >> b >> c; | ^ a.cc:10:21: error: 'b' was not declared in this scope 10 | cin >> a >> b >> c; | ^ a.cc:10:26: error: 'c' was not declared in this scope...
s725838523
p03835
C++
#include <iostream> int main() { int K, S; std::cin >> K >> S; int cnt = 0; for (int i = 0; i <= K; ++i) { for (int j = 0; j <= K; ++j) { int k = S - i - j; if ( 0 <= z && z <= K ) ++cnt; } } std::cout << cnt << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:11:17: error: 'z' was not declared in this scope 11 | if ( 0 <= z && z <= K ) ++cnt; | ^
s001511841
p03835
C++
#include <iostream> using namespace std; int main(){ int k=0, s=0; cin >> k >> s; int counter=0; int x=0,y=0,z=0; for(int i=0; i<=k; ++i){ for(int j=i; j<=k; ++j){ x = i;s y = j; z = k - x - y; if(z>=0) ++counter; } } cou...
a.cc: In function 'int main()': a.cc:12:20: error: expected ';' before 'y' 12 | x = i;s | ^ | ; 13 | y = j; | ~
s995311530
p03835
C++
#include <iostream> using namespace std; int main(){ int k=0, s=0; cin >> k >> s; int counter=0; int x=0,y=0,z=0; for(int j=0; j<k; ++j){ for(int i=0; i<k; ++i){ x = i; y = j; z = s - i - j; if(z >= 0) ++counter; } } cout...
a.cc: In function 'int main()': a.cc:19:31: error: expected '}' at end of input 19 | cout << counter-1 << endl; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s109176978
p03835
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int S,K; int ans; cin >> K >> S; for(x,K+1){ for(y,K+1){ int z = S - x - y; if(z>=0 && z <= K){ ans++; } } }...
a.cc: In function 'int main()': a.cc:9:9: error: 'x' was not declared in this scope 9 | for(x,K+1){ | ^ a.cc:18:1: error: expected primary-expression before '}' token 18 | } | ^ a.cc:17:25: error: expected ')' before '}' token 17 | cout << ans << endl; | ...
s711651003
p03835
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int S,K; int ans; cin >> K >> S; for(x,K+1){ for(y,K+1){ for(z,K+1){ if((x+y+z) == S){ ans++; } ...
a.cc: In function 'int main()': a.cc:9:9: error: 'x' was not declared in this scope 9 | for(x,K+1){ | ^ a.cc:19:1: error: expected primary-expression before '}' token 19 | } | ^ a.cc:18:25: error: expected ')' before '}' token 18 | cout << ans << endl; | ...
s620401675
p03835
C++
ソースコード Copy Copy #include <iostream> int main(void) { int k, s; std::cin >> k; std::cin >> s; int count = 0; for (int x = 0; x <= k; ++x) { for (int y = 0; y <= k; ++y) { int z = s - x - y; if ((z >= 0) && (z <= k)) { count++; ...
a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type 1 | ソースコード | ^~~~~~~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr...
s516985689
p03835
C++
ソースコード Copy Copy #include <iostream> int main(void) { int k, s; std::cin >> k; std::cin >> s; int count = 0; for (int x = 0; x <= k; ++x) { for (int y = 0; y <= k; ++y) { int z = s - x - y; if (z >= 0 && z <= k) { count++; ...
a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type 1 | ソースコード | ^~~~~~~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr...
s732175075
p03835
C++
ソースコード Copy Copy #include <iostream> int main(void) { int k, s; std::cin >> k; std::cin >> s; int count = 0; for (int x = 0; x <= k; ++x) { for (int y = 0; y <= k; ++y) { int z = s - x - y; if (z >= 0 && z <= k) { count++; ...
a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type 1 | ソースコード | ^~~~~~~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr...
s008866859
p03835
C++
#include <iostream> #include<algorithm> #include<math.h> #include<set> #include<vector> using namespace std; int main() { ll K, S; cin >> K >> S; ll cnt = 0; for (ll x = 0; x <= K; ++x) { for (ll y = 0; y <= K; ++y) { ll z = S - x - y; if (z >= 0 && z <= K) ++cnt; } } cout << cnt << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: 'll' was not declared in this scope 8 | ll K, S; | ^~ a.cc:9:16: error: 'K' was not declared in this scope 9 | cin >> K >> S; | ^ a.cc:9:21: error: 'S' was not declared in this scope 9 | cin >> K >> S...
s675157381
p03835
C++
#include <bits/stdc++.h> using namespace std; int main() { int K,S; cin >> K >> S; int x,y,z,a; a=0; for(x=0;x<=K;x++){ for(y=0;y<=K;y++){ for(z=0;z<=K;z++){ if(x+y+z==S){ a++;} } } } cout << a << endl;
a.cc: In function 'int main()': a.cc:17:21: error: expected '}' at end of input 17 | cout << a << endl; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s445948616
p03835
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,s; cin >> n >> s; int count = 0; for(int i=0;i<=n;i++) { for(int j=0;j<=n;j++) { int temp = s-i-j; if(temp >= 0 && temp <= k) count++; } } cout << count << e...
a.cc: In function 'int main()': a.cc:18:37: error: 'k' was not declared in this scope 18 | if(temp >= 0 && temp <= k) | ^
s114214761
p03835
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> using namespace std; typedef long long lng; #define FOR(i,a,b) for(int i=(a); i<=(b); ++i) #define FORD(i,b,a) for(int i=(b); i>=(a); --i) #define REP(i,n) FOR(i,0,n-1) #define ALL(a) (a).begin(), (a).end() #define UNIQUE(a) a.erase(unique(ALL(a))...
a.cc: In function 'int main()': a.cc:28:22: error: 'cnt' was not declared in this scope; did you mean 'int'? 28 | if(i+j+k==S) cnt++; | ^~~ | int a.cc:30:13: error: 'cnt' was not declared in this scope; did you mean 'int'? 30 | cout << cnt << endl;...
s846895792
p03835
C++
#include <bits/stdc++.h> using namespace std; int main() { int K, S; cin >> K >> S; int N = 0; for (int i = 0; i <= K; i++) { for (int j = 0; j <= K; j++) { { if(i + j <= S && i + j + K >= S) N ++; } } cout << N << endl; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s392180146
p03835
C++
#include <bits/stdc++.h> using namespace std; int main() { int K, S; cin >> K >> S; N = 0; for (int i = 0; i <= K-1; i++) { for (int j = 0; j <= K-1; j++) { for (int k = 0; k <= K-1; k++) { if(i + j + k == S) N ++; } } } cout << N << endl; }
a.cc: In function 'int main()': a.cc:7:3: error: 'N' was not declared in this scope 7 | N = 0; | ^
s783595702
p03835
C++
#include <bits/stdc++.h> using namespace std; int main() { int K,s; cin >> K >> s; int count=0; for(int i=0; i<K+1; i++) { for(int j=0; j<K+1; j++) { if(s-(i+j) <= k) count++; } } cout << count << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:23: error: 'k' was not declared in this scope 13 | if(s-(i+j) <= k) | ^
s748871824
p03835
C
#include <stdio.h> int main(){ int k,s; int x,y,z; int count; scanf("%d%d", &k, &s); for(x = 0; x <= k; x++){ for(y = 0; y <= k; y++){ z = s - x - y; if(0 <= z && z <= k)count++; } printf("%d", count); return 0; }
main.c: In function 'main': main.c:18:1: error: expected declaration or statement at end of input 18 | } | ^
s188231644
p03835
C++
#include <iostream> using namespace std; int main() { int K; int S; int cnt; int Y; int Z; cin >> K >> S; for (int i = 0 ; i < K+1 ; ++i ){ for ( int j = 0 ; i < K+1 ; ++i ){ Y = S - i - j; if ( Y >= 0 && Y <= K){ ++cnt; } } } cout << cnt << endl;
a.cc: In function 'int main()': a.cc:17:23: error: expected '}' at end of input 17 | cout << cnt << endl; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s565568688
p03835
C++
#include <iosteram> using namespace std; int main() { int K; int S; int cnt; int Y; int Z; cin >> K >> S; for (int i = 0 ; i < K+1 ; ++i ){ for ( int j = 0 ; i < K+1 ; ++i ){ Y = S - i - j; if ( Y >= 0 && Y <= K){ ++cnt; } } } cout << cnt << endl;
a.cc:1:10: fatal error: iosteram: No such file or directory 1 | #include <iosteram> | ^~~~~~~~~~ compilation terminated.
s734805279
p03835
C++
#include <iostream> using namespace std; int main(){ int K,S; cin>>K>>S; int res=0; for(int x=0; x <= K; ++x){ for(int y=0; y <= K; ++y){ int z = S-x-y; if (z>=0&&z<=k) ++res; } } cout << res <<endl; }
a.cc: In function 'int main()': a.cc:12:14: error: 'k' was not declared in this scope 12 | if (z>=0&&z<=k) ++res; | ^
s189558525
p03835
C++
#include <iostream> using namespace std; int main(){ int K,S; cin>>K>>S; int res=0; for(int x=0; x <= K; ++x){ for(int y=0; y <= K; ++y){ int z = S-x-y; if (total==K) ++res; } } cout << res <<endl; }
a.cc: In function 'int main()': a.cc:12:5: error: 'total' was not declared in this scope 12 | if (total==K) ++res; | ^~~~~
s107276065
p03835
C++
#include <iostream> using namespace std; int main(){ int K,S; cin>>K>>S; int res=0; for(int x=0; x <= K; ++x){ for(int y=0; y <= K; ++y){ int z = S - x - y; if (0<=z&& z<=k) ++res; } } }
a.cc: In function 'int main()': a.cc:12:15: error: 'k' was not declared in this scope 12 | if (0<=z&& z<=k) ++res; | ^
s452198594
p03835
C++
#include <iostream> using namespace std; int main(){ int K,S; cin>>K>>S; int res=0; for(int x=0; x <= K; ++x){ for(int y=0; y <= K; ++y){ for(int z=0; z <= K; ++z){ int total = x + y + z if (total==K) ++res; } } } cout << res <<endl; }
a.cc: In function 'int main()': a.cc:13:1: error: expected ',' or ';' before 'if' 13 | if (total==K) ++res; | ^~
s950854592
p03835
C++
#include <iostream> using namespace std; int main(){ int K,S; cin>>K>>S; int res=0; for(int x=0; x <= K; ++x){ for(int y=0; y <= K; ++y){ for(int z=0; z <= K; ++z){ int total = x + y + z; if (total==X) ++res; } } } cout << res <<endl; }
a.cc: In function 'int main()': a.cc:13:12: error: 'X' was not declared in this scope 13 | if (total==X) ++res; | ^
s561868912
p03835
C++
#include <iostream> using namespace std; int main(){ int K,S; cin>>K>>S; int res=0; for(int x=0; x <= K; ++x){ for(int y=0; y <= K; ++y){ for(int z=0; z <= K; ++z){ int total = x + y + z; if (total==S) ++res; } } } cout << res <<endl; } #inc...
a.cc:23:5: error: redefinition of 'int main()' 23 | int main(){ | ^~~~ a.cc:4:9: note: 'int main()' previously defined here 4 | int main(){ | ^~~~
s940265853
p03835
C++
#include <iostream> using namespace std; int main(){ int K,S; cin>>K>>S; int res=0; for(int x=0; x <= K; ++x){ for(int y=0; y <= K; ++y){ for(int z=0; z <= K; ++z){ int total = x + y + z; if (total==S) ++res; } }
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:9:26: note: to match this '{' 9 | for(int x=0; x <= K; ++x){ | ^ a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:4:11: note: to match this '{' 4 | int ...
s963775474
p03835
C++
#include < bits/stdc++.h> using namespace std; int main() { int k,s,count; cin>>k>>s; count=0; for(int x=0;x<k;x++){ for(int y=0;y<k;y++){ for(int z=0;z<k;z++){ if(x+y+z==s)count++; } } } cout<<count<<endl; return 0; }
a.cc:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include < bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s536112614
p03835
C++
#include <iostream> using namespace std; int main(){ int x,y,z,k,s; int as = 0; cin >> k >> s; for(int x =0; x<=k; ++x){ for(int y =0; y<=k; ++y){ int z = s - x - y; if(0 <= z and z <= k;){ as = as + 1; } } } cout << as << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:26: error: expected primary-expression before ')' token 11 | if(0 <= z and z <= k;){ | ^
s191082249
p03835
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> using namespace std; int main() { int i,j,k,s,x,y,z; int counter = 0; cin >> k >> s; for(x = 0; x <= k;x++) { for(y = 0;y <= k; y++){ z = s - x - y; if(z => 0 && z <= k) { ...
a.cc: In function 'int main()': a.cc:18:19: error: expected primary-expression before '>' token 18 | if(z => 0 && z <= k) { | ^
s318893450
p03835
C++
#include<iostream> using namespace std; int main() { int K, S; cin >> K >> S; int res = 0; for (int x = 0; x <= K; ++x) { for (int y = 0; y <= K; ++y) { int z = S - x - y; if (0 <= z && z <= K) ++res; } } } cout << res << endl; return 0; }
a.cc:18:3: error: 'cout' does not name a type 18 | cout << res << endl; | ^~~~ a.cc:20:3: error: expected unqualified-id before 'return' 20 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s199014041
p03835
C++
#include<iostream> using namespace std; int main() { int K, S; cin >> K >> S; int res = 0; for (int x = 0; x <= K; ++x) { for (int y = 0; y <= K; ++y) { int z = S - x - y; if (0 <= Z && Z <= K) ++res; } } } cout << res << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:18: error: 'Z' was not declared in this scope 13 | if (0 <= Z && Z <= K) ++res; | ^ a.cc: At global scope: a.cc:18:3: error: 'cout' does not name a type 18 | cout << res << endl; | ^~~~ a.cc:20:3: error: expected unqualified-id befor...
s145847752
p03835
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> using namespace std; int main (void) { int k, s; cin >> k >> s; int ans=0; for (int i=0; i<=N-1; i++) { for (int j=0; j<=N-1; j++) { for (int k=0; k<=N-1; k++) { if (i+j+k == s) ans= ans+1; } } } cout <<...
a.cc: In function 'int main()': a.cc:11:20: error: 'N' was not declared in this scope 11 | for (int i=0; i<=N-1; i++) { | ^
s964490840
p03835
C++
#include <iostream> using namespace std; int main(){ int X, Y, Z, K, S; cin >> K >> S; int ans = 0; for (int X = 0; X <= K; ++X){ for (int Y = 0; Y <= K; ++Y){ Z = S - X - Y; if(0 <= Z <= K) ++ans; } } } cout << ans << endl; }
a.cc:16:3: error: 'cout' does not name a type 16 | cout << ans << endl; | ^~~~ a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s559026203
p03835
Java
package atc1; import java.util.*; public class main { public static void main(String args) { int cnt = 0; Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int S = sc.nextInt(); for(int i = 0; i < K; i++) { for(int j = 0; j < K; j++) { for(int k = 0; k < K; k++) { if(i + j + k...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s744801195
p03835
Java
package spring; import java.util.*; public class B_51 { public static void main(String args) { int cnt = 0; Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int S = sc.nextInt(); for(int i = 0; i < K; i++) { for(int j = 0; j < K; j++) { for(int k = 0; k < K; k++) { if(i + j + k == S) { ...
Main.java:3: error: class B_51 is public, should be declared in a file named B_51.java public class B_51 { ^ 1 error
s013250922
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int S = sc.nextInt(); int counter = 0; for(int i = 0;i <= K;i++){ for(int j = 0;j <= K;j++){ if(S-i-j >=0 && S-i-j <= K)counter++; } } } System.ou...
Main.java:14: error: <identifier> expected System.out.println(counter); ^ Main.java:14: error: <identifier> expected System.out.println(counter); ^ Main.java:15: error: class, interface, enum, or record expected }} ^ 3 errors
s845723904
p03835
C++
#include<bits/stdc++.h> using namespace std; int main(){ int i,j,x,y,z,k,s,; cin>>k>>s; int ans=0; for(i=0;i<=k;i++){ for(j=0;j<=k;j++){ if(s-i-j<=k&&0<=s-i-j){ ans++; } } } return 0; }
a.cc: In function 'int main()': a.cc:4:27: error: expected unqualified-id before ';' token 4 | int i,j,x,y,z,k,s,; | ^
s546281756
p03835
Java
import java.util.*; public static void main(String[] atgs) { Scanner scan = new Scanner(System.in); int ans = 0; int K = scan.nextInt(); int S = scan.nextInt(); for(int x = 0; x <= K; x++){ for(int y = 0; y <= K; y++){ int z = S - x - y; if(0 <= z && z <= K){ ans = ans + 1; } } } ...
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] atgs) { ^ (use --enable-preview to enable unnamed classes) 1 error
s482464038
p03835
Java
import java.util.*; public class at51B { public static void main(String[] atgs) { Scanner scan = new Scanner(System.in); int ans = 0; int K = scan.nextInt(); int S = scan.nextInt(); for(int x = 0; x <= K; x++){ for(int y = 0; y <= K; y++){ int z = S - x - y; if(0 <= z && z <= K){ ans = ans + ...
Main.java:2: error: class at51B is public, should be declared in a file named at51B.java public class at51B { ^ 1 error
s977647227
p03835
C++
#include <iostream> using namespace std; int main(){ int K, S; cin >> K >> S; for(int X=0;X<=K;X++){ for(int Y=0;Y<=K;Y++){ if(S-X-Y<=K&&S-X-Y>=0) a++; } } cout << a ; }
a.cc: In function 'int main()': a.cc:10:48: error: 'a' was not declared in this scope 10 | if(S-X-Y<=K&&S-X-Y>=0) a++; | ^ a.cc:13:17: error: 'a' was not declared in this scope 13 | cout << a ; | ^
s981013134
p03835
C++
#include <bits/stdc++.h> // #include "bits/stdc++.h" #define pout(n) printf ("%d\n", n) #define rep(i,a,n) for (int i = a;i < n;i++) #define per(i,n,a) for (int i = n-1;i >= a;i--) typedef long long ll; using namespace std; int main (){ int k,s,count = 0; cin >> k >> s; rep(i,0,k+1){ rep(j,0,k+1){ ...
a.cc: In function 'int main()': a.cc:18:17: error: 'x' was not declared in this scope 18 | int z = s-x-j; | ^ a.cc: At global scope: a.cc:4:25: error: expected constructor, destructor, or type conversion before '(' token 4 | #define pout(n) printf ("%d\n", n) | ...
s065253641
p03835
C++
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #define INF 1000000007 using namespace std; int main(){ int K,S; scanf("%d %d",&K,&S); int cnt=0; for(int i=0;i<=K;i++){ for(int j=0;j<=K;j++){ int z=S-i-j; if(0<=z&&z<=k) cnt++; } } printf("%d\n",cnt); retur...
a.cc: In function 'int main()': a.cc:14:19: error: 'k' was not declared in this scope 14 | if(0<=z&&z<=k) cnt++; | ^
s667152666
p03835
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <numeric> #include <string> using namespace std; const double PI = acos(-1.0); const string alp = "abcdefghijklmnopqrstuvwxyz"; const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(...
a.cc: In function 'int main()': a.cc:33:41: error: expected ';' before '}' token 33 | t -= 2 * (l - k) | ^ | ; 34 | } | ~
s631357480
p03835
Java
#include <bits/stdc++.h> using namespace std; #define int long long int K, S, ans = 0; signed main() { cin >> K >> S; for (int i = 0; i <= K; i++) { for (int j = 0; j <= K; j++) { if (S >= i + j && S - i - j <= K) { ans++; } } } cout << ans << e...
Main.java:1: error: illegal character: '#' #include <bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include <bits/stdc++.h> ^ Main.java:4: error: illegal character: '#' #define int long long ^ Main.java:4: error: class, interface, enum, or record expected #define int long long...
s058067910
p03835
C++
#include <bits//stdc++.h> using namespace std; int main(void){ int k,s; cin >> k >> s; for(int i=0;i<=k;i++){ for(int z=0;z<=k;z++){ if(k-i-j<=0&&k-i-j<=k){ count++; } } } cout << count << endl; }
a.cc: In function 'int main()': a.cc:8:20: error: 'j' was not declared in this scope 8 | if(k-i-j<=0&&k-i-j<=k){ | ^ a.cc:9:22: error: no post-increment operator for type 9 | count++; | ^~ a.cc:13:10: error: no match for 'operator<<...
s588902029
p03835
C++
#include <iostream> using namespace std; #define PrintLn(X) cout << X << endl #define Rep(i, n) for(int i = 0; i < (int)(n); ++i) int main(void) { int K, S; cin >> K >> S; int ans++; Rep(X, K + 1){ Rep(Y, K + 1){ int Z = S - X - Y; if(0 <= Z && Z <= K){ ans++; } } } PrintLn(ans); }
a.cc: In function 'int main()': a.cc:11:16: error: expected initializer before '++' token 11 | int ans++; | ^~ a.cc:16:33: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | ans++; | ^~~ | ...
s243371731
p03835
C++
#include <iostream> using namespace std; #define PrintLn(X) cout << X << endl #define Rep(i, n) for(int i = 0; i < (int)(n); ++i) int main(void) { int K, S; cin >> K >> S; int ans++; Rep(X, K + 1){ Rep(Y, K + 1){ Z = S - X - Y; if(0 <= Z && Z <= K){ ans++; } } } PrintLn(ans); }
a.cc: In function 'int main()': a.cc:11:16: error: expected initializer before '++' token 11 | int ans++; | ^~ a.cc:14:25: error: 'Z' was not declared in this scope 14 | Z = S - X - Y; | ^ a.cc:16:33: error: 'ans' was not declared ...
s598305253
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = Integer.parseInt(sc.next()); int s = Integer.parseInt(sc.next()); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ ...
Main.java:10: error: cannot find symbol int z = S - x + y; ^ symbol: variable S location: class Main 1 error
s344853312
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = Integer.parseInt(sc.next()); int s = Integer.parseInt(sc.next()); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ ...
Main.java:10: error: cannot find symbol if(z <= 0 && z <= k) ans++; ^ symbol: variable z location: class Main Main.java:10: error: cannot find symbol if(z <= 0 && z <= k) ans++; ^ symbol: variable z location: cla...
s575203992
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = sc.next(); int s = sc.next(); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ if(z <= 0 && z <= ...
Main.java:5: error: incompatible types: String cannot be converted to int int k = sc.next(); ^ Main.java:6: error: incompatible types: String cannot be converted to int int s = sc.next(); ^ Main.java:10: error: cannot find symbol if(z <= ...
s363623916
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = sc.next(); int s = sc.next(); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ for(int z = 0; z <= k;...
Main.java:5: error: incompatible types: String cannot be converted to int int k = sc.next(); ^ Main.java:6: error: incompatible types: String cannot be converted to int int s = sc.next(); ^ 2 errors
s127109451
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = in.next(); int s = in.next(); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ for(int z = 0; z <= k;...
Main.java:5: error: cannot find symbol int k = in.next(); ^ symbol: variable in location: class Main Main.java:6: error: cannot find symbol int s = in.next(); ^ symbol: variable in location: class Main 2 errors
s895111286
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = in.next()); int s = in.next()); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ for(int z = 0; z <= ...
Main.java:5: error: ';' expected int k = in.next()); ^ Main.java:6: error: ';' expected int s = in.next()); ^ 2 errors
s315114983
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = Integer.parseInt(in.next()); int s = Integer.parseInt(in.next()); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ ...
Main.java:5: error: cannot find symbol int k = Integer.parseInt(in.next()); ^ symbol: variable in location: class Main Main.java:6: error: cannot find symbol int s = Integer.parseInt(in.next()); ^ symbol: variable in location:...
s500361673
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { scanner sc = new Scanner(System.in); int k = Integer.parseInt(in.next()); int s = Integer.parseInt(in.next()); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ ...
Main.java:4: error: cannot find symbol scanner sc = new Scanner(System.in); ^ symbol: class scanner location: class Main Main.java:5: error: cannot find symbol int k = Integer.parseInt(in.next()); ^ symbol: variable in location: class Main Main.java:6...
s757443122
p03835
Java
import java.util.*; public class Main { public static void main(String[] args) { canner sc = new Scanner(System.in); int k = Integer.parseInt(in.next()); int s = Integer.parseInt(in.next()); int ans = 0; for(int x = 0;x <= k;x++){ for(int y = 0; y <= k; y++){ ...
Main.java:4: error: cannot find symbol canner sc = new Scanner(System.in); ^ symbol: class canner location: class Main Main.java:5: error: cannot find symbol int k = Integer.parseInt(in.next()); ^ symbol: variable in location: class Main Main.java:6: error: canno...
s481315224
p03835
C
#include <stdio.h> int main(){ int k=0,s=0; int ans=0; scanf("%d %d",&k,&s); for(int x=0;x<=k;x++){ for(int y=0;y<=k;y++){ if(s - x - y<=k and s - x - y>=0)ans++; } } printf("%d\n",ans); }
main.c: In function 'main': main.c:8:40: error: expected ')' before 'and' 8 | if(s - x - y<=k and s - x - y>=0)ans++; | ~ ^~~~ | )
s571495483
p03835
Java
package 自習用; import java.util.*; public class AtCoder_51_B { public static void main(String[] args){ Scanner sc = new Scanner(System.in); final int K = sc.nextInt(); final int S = sc.nextInt(); int counter = 0; for( int i = 0; i <= K; i++){ int sum_i = i; if( sum_i == S ){ counter++; continue...
Main.java:4: error: class AtCoder_51_B is public, should be declared in a file named AtCoder_51_B.java public class AtCoder_51_B { ^ 1 error
s839957799
p03835
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); int b = scan.nextInt(); int a = scan.nextInt(); int ans=0; for(int i=0;i<=b;i++){ for(int n=0;n<=b;n++){ int f= a-i-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:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s015999855
p03835
C++
#include <cstdio> #include <iostream> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #include <queue> #include <stack> #include <functional> #include <set> #include <map> #include <deque> #define WMAX 10000 #define HMAX 10000 //コメントアウトするとdebug()を実行しない #define DEBUG using namespace std; t...
a.cc:28:21: error: 'Y' was not declared in this scope 28 | int K,S,ans = 0,X = Y = Z = 0; | ^ a.cc:28:25: error: 'Z' was not declared in this scope 28 | int K,S,ans = 0,X = Y = Z = 0; | ^
s076700016
p03835
Java
import java.util.*; public class SumofThreeIntegers { public static void main(String[] args) { // TODO Auto-generated method stub Scanner s=new Scanner(System.in); int K=s.nextInt(); int S=s.nextInt(); int count=6; int i=0,j=0,k=0; for(i=1;i<=K;i++){ for(j=1;j<=K;j++){ for(k=1;k<=K;k++){ ...
Main.java:3: error: class SumofThreeIntegers is public, should be declared in a file named SumofThreeIntegers.java public class SumofThreeIntegers { ^ 1 error
s371947524
p03835
C++
# -*- coding: utf-8 -*- def main(): k, s = map(int, input().split()) answer = solve(k, s) return answer def solve(k, s): count = 0 for i in range(k + 1): v = 0 v += i if v == s: count += 1 continue for j in range(k + 1): v += j ...
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:4:1: error: 'def' does not name a type 4 | def main(): | ^~~