submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s705699935
|
p00008
|
Java
|
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.println("Enter a number:" );
int n = reader.nextInt();
System.out.println((sum(n)));
reader.close();
}
public static int sum(int n){
int combos = 0;
for(int i=0; i<=9; i++){
for(int j=0; j<=9; j++){
for (int k=0; k<=9; k++){
for(int l=0; l<=9; l++){
if ((i + j + k + l) == n){
combos++;
}
}
}
}
}
return combos;
}
}
|
Main.java:3: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s672687151
|
p00008
|
Java
|
import java.util.Scanner;
public class p1 {
public static void main(String args[]) {
int n, ans;
Scanner reader = new Scanner(System.in);
while (true) {
n = reader.nextInt();
ans = 0;
for(int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int c = 0; c < 10; c++) {
for (int d = 0; d < 10; d++) {
if (a + b + c + d == n) {
ans++;
}
}
}
}
}
System.out.println(ans);
}
}
}
|
Main.java:3: error: class p1 is public, should be declared in a file named p1.java
public class p1 {
^
1 error
|
s010629473
|
p00008
|
Java
|
import java.util.*;
import java.io.*;
public class November7of2017 {
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
while( (s=br.readLine())!=null)
{
int n = Integer.parseInt(s);
System.out.println(getComb(n));
}
}
public static int getComb( int n)
{
int total = 0;
for( int i=0;i<=9;i++)
{
for(int j =0; j<=9;j++)
{
for(int k = 0;k<=9;k++)
{
for( int l = 0; l<=9;l++)
{
if((i+j+k+l) == n)
{
total++;
}
}
}
}
}
return total;
}
}
|
Main.java:4: error: class November7of2017 is public, should be declared in a file named November7of2017.java
public class November7of2017 {
^
1 error
|
s336542128
|
p00008
|
Java
|
public class Main {
public static void main(String[] args){
int count=0;
int a=0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int i = 0;i<=9;i++) {
for(int j = 0;j<=9;j++) {
for(int k =0;k<=9;k++) {
for(int l = 0;l<=9;l++) {
a = i + j + k + l;
if(a==n) count++;
}
}
}
}
System.out.println(count);
}
}
|
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s279862341
|
p00008
|
Java
|
public class Main {
public static void main(String[] args){
int count=0;
int a=0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int i = 0;i<=9;i++) {
for(int j = 0;j<=9;j++) {
for(int k =0;k<=9;k++) {
for(int l = 0;l<=9;l++) {
a = i + j + k + l;
if(a==n) count++;
}
}
}
}
System.out.println(count);
}
}
|
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s251079338
|
p00008
|
Java
|
public class Main {
public static void main(String[] args){
int count=0;
int a=0;
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int n = sc.nextInt();
for (int i = 0;i<=9;i++) {
for(int j = 0;j<=9;j++) {
for(int k =0;k<=9;k++) {
for(int l = 0;l<=9;l++) {
a = i + j + k + l;
if(a==n) count++;
}
}
}
}
System.out.println(count);
}
}
}
|
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s210400367
|
p00008
|
Java
|
iimport java.util.Scanner;
public class Main {
public static void main(String[] args){
int count=0;
int a=0;
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int n = sc.nextInt();
for (int i = 0;i<=9;i++) {
for(int j = 0;j<=9;j++) {
for(int k =0;k<=9;k++) {
for(int l = 0;l<=9;l++) {
a = i + j + k + l;
if(a==n) count++;
}
}
}
}
System.out.println(count);
}
}
}
|
Main.java:2: error: class, interface, enum, or record expected
iimport java.util.Scanner;
^
1 error
|
s028094497
|
p00008
|
Java
|
import java.io.*;
class Sumof4Integers
{
public static void main(String args[])throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
for(;;)
{
int cnt=0;
String str_n = br.readLine();
if(str_n==null) break;
int n = Integer.parseInt(str_n);
for(int a = 0; a <= 9; a++)
{
for(int b = 0; b <= 9; b++)
{
for(int c = 0; c <= 9; c++)
{
for(int d = 0; d <= 9; d++)
{
if(a+b+c+d==n)
cnt++;
}
}
}
}
System.out.println(cnt);
}
}
|
Main.java:30: error: reached end of file while parsing
}
^
1 error
|
s710514060
|
p00008
|
Java
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
public class Sum
{
public static void main(String[] arg) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
while((s=br.readLine())!=null)
{
int n = Integer.valueOf(s);
int comb=0;
int[] a = new int[10];
for(int i=0; i<10; i++)
a[i] = i;
for(int b=0; b<10; b++)
for(int c=0; c<10; c++)
for(int d=0; d<10; d++)
if(Arrays.binarySearch(a,n-b-c-d)>=0)
comb++;
System.out.println(comb);
}
}
}
|
Main.java:6: error: class Sum is public, should be declared in a file named Sum.java
public class Sum
^
1 error
|
s713441660
|
p00008
|
Java
|
import java.util.Scanner;
public class AOJ_0008 {
/**
* @param args
*/
public void run(){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int count = 0;
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
for(int k=0;k<10;k++){
for(int l=0;l<10;l++){
if(i+j+k+l==n){
count++;
}
}
}
}
}
System.out.println(count);
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
new AOJ_0008().run();
}
}
|
Main.java:3: error: class AOJ_0008 is public, should be declared in a file named AOJ_0008.java
public class AOJ_0008 {
^
1 error
|
s132701074
|
p00008
|
Java
|
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public void run(){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int count = 0;
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
for(int k=0;k<10;k++){
for(int l=0;l<10;l++){
if(i+j+k+l==n){
count++;
}
}
}
}
}
System.out.println(count);
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
new AOJ_0008().run();
}
}
|
Main.java:29: error: cannot find symbol
new AOJ_0008().run();
^
symbol: class AOJ_0008
location: class Main
1 error
|
s096312480
|
p00008
|
Java
|
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public void run(){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int count = 0;
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
for(int k=0;k<10;k++){
for(int l=0;l<10;l++){
if(i+j+k+l==n){
count++;
}
}
}
}
}
System.out.println(count);
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
new Main.run();
}
}
|
Main.java:29: error: cannot find symbol
new Main.run();
^
symbol: class run
location: class Main
1 error
|
s164027887
|
p00008
|
Java
|
import java.util.*;
public class eight{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int count;
int n;
while(true){
count = 0;
if(!sc.hasNext())break;
n = sc.nextInt();
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
for(int k=0;k<10;k++){
for(int l=0;l<10;l++){
if(i+j+k+l == n)++count;
}
}
}
}
System.out.println(count);
}
}
}
|
Main.java:3: error: class eight is public, should be declared in a file named eight.java
public class eight{
^
1 error
|
s264993024
|
p00008
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int n=sc.nextInt();
for(int i1=0;i1<=n;i1++){
for(int i2=0;i2<=n-i1;i2++){
for(int i3=0;i3<=n-i1-i2;i3++){
int i4=n-i1-i2-i3;
System.out.println(i1+","+i2+","+i3+","+i4);
}
}
}
}
sc.close();
}
}
sc.close();
}
}
|
Main.java:19: error: class, interface, enum, or record expected
sc.close();
^
Main.java:20: error: class, interface, enum, or record expected
}
^
2 errors
|
s180224015
|
p00008
|
Java
|
import java.util.*;
class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int count = 0;
if(n>36){
System.out.println(0);
continue;
}else{
for(int a=0; a<10;a++){
for(int b=0; b<10-a; b++){
for(int c=0; c<10-(a+b); c++){
for(int d=0; d<10(a+b+c); d++){
if((a+b+c+d)==n){
count++;
}
}
}
}
}
}
System.out.println(count);
}
}
}
|
Main.java:17: error: ';' expected
for(int d=0; d<10(a+b+c); d++){
^
Main.java:17: error: ')' expected
for(int d=0; d<10(a+b+c); d++){
^
Main.java:17: error: ';' expected
for(int d=0; d<10(a+b+c); d++){
^
3 errors
|
s849041670
|
p00008
|
Java
|
import java.util.Scanner;
class Main{
public static void main(String[] a) {
Scanner keyboad=new Scanner(System.in);
n=keyboad.nextInt()
for(int a=0;a<10;a++){
for(int b=0;b<10;b++){
for(int c=0;c<10;c++){
for(int d=0;d<10;d++){
if(a+b+c+d==n){
count++;
}
}
}
}
}
|
Main.java:7: error: ';' expected
n=keyboad.nextInt()
^
Main.java:18: error: reached end of file while parsing
}
^
2 errors
|
s967013581
|
p00008
|
Java
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Sum4 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String input = br.readLine();
int inputAngka = Integer.parseInt(input);
int counter = 0;
for(int i = 0; i <= 9; i++){
for(int j = 0; j <= 9; j++){
for(int k = 0; k <= 9; k++){
for(int l = 0; l <= 9; l++){
if(i + j + k + l == inputAngka){
counter++;
}
}
}
}
}
System.out.println(counter);
}
}
|
Main.java:5: error: class Sum4 is public, should be declared in a file named Sum4.java
public class Sum4 {
^
1 error
|
s653306738
|
p00008
|
Java
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Sum4 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String input = br.readLine();
int inputAngka = Integer.parseInt(input);
int counter = 0;
for(int i = 0; i <= 9; i++){
for(int j = 0; j <= 9; j++){
for(int k = 0; k <= 9; k++){
for(int l = 0; l <= 9; l++){
if(i + j + k + l == inputAngka){
counter++;
}
}
}
}
}
System.out.println(counter);
}
}
|
Main.java:5: error: class Sum4 is public, should be declared in a file named Sum4.java
public class Sum4 {
^
1 error
|
s906901831
|
p00008
|
Java
|
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String line = sc.nextLine();
Scanner s = new Scanner(line);
int n = s.nextInt();
int m = 0;
if (n < 37) { //37以上の場合はm=0は確かであるため
for(int a=0; a<=9; a++) {
for(int b=0; b<=9; b++) {
for(int c=0; c<=9; c++) {
for(int d=0; d<=9; d++) {
if (a + b + c + d == n) m++;
}
}
}
}
}
System.out.println(m);
}
}
}
|
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find symbol
Scanner s = new Scanner(line);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find symbol
Scanner s = new Scanner(line);
^
symbol: class Scanner
location: class Main
4 errors
|
s488457536
|
p00008
|
Java
|
import java.util.Scanner;
public class AOJ_Volume0008 {
public static void main(String[] args){
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
while(sc.hasNextLine()){
int number = sc.nextInt();
int count = 0;
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
for(int k=0;k<10;k++){
for(int l=0;l<10;l++){
if(i+j+k+l == number) count++;
}
}
}
}
System.out.println(count);
}
}
}
|
Main.java:4: error: class AOJ_Volume0008 is public, should be declared in a file named AOJ_Volume0008.java
public class AOJ_Volume0008 {
^
1 error
|
s128181420
|
p00008
|
Java
|
import java.io.*;
public class Main0008{
public static void main(String[] args){
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
String s;
int t;
int n=0;
try{
while((s=reader.readLine()) !=null){
t=Integer.parseInt(s);
for(int a=0;a<10;a++){
for(int b=0;b<10;b++){
for(int c=0;c<10;c++){
for(int d=0;d<10;d++){
if((a+b+c+d) == t){
n += 1;
}
}
}
}
}
System.out.println(n);
n=0;
}
}catch(IOException e){
System.out.println(e);
}
}
}
|
Main.java:3: error: class Main0008 is public, should be declared in a file named Main0008.java
public class Main0008{
^
1 error
|
s142429676
|
p00008
|
C
|
#include <stdio.h>
int main()
{
int n;
while(scanf("%d",&n)! EOF){
int a b,c,d;
int count=0;
for (a=0;a<=9;a++)
for(b=0;b<=9;b++)
for(c=0;c<=9;c++)
for(d=0;d<=9;d++)
if(a+b+c+d==n){
count++;}
printf("%d\n",count);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:25: error: expected ')' before '!' token
5 | while(scanf("%d",&n)! EOF){
| ~ ^
| )
main.c:6:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'b'
6 | int a b,c,d;
| ^
main.c:6:15: error: 'b' undeclared (first use in this function)
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:17: error: 'c' undeclared (first use in this function)
6 | int a b,c,d;
| ^
main.c:6:19: error: 'd' undeclared (first use in this function)
6 | int a b,c,d;
| ^
main.c:8:14: error: 'a' undeclared (first use in this function)
8 | for (a=0;a<=9;a++)
| ^
|
s416268518
|
p00008
|
C
|
#include<stdio.h>
int main(){
int i,j,k,l,a,cnt;
while(scanf("\n%d",&a)!=EOF{)
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(k=0;k<10;k++){
for(l=0;l<10;l++){
if(i+j+k+l==a){
cnt++;
}
}}}}
printf("%d\n",cnt);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:28: error: expected ')' before '{' token
5 | while(scanf("\n%d",&a)!=EOF{)
| ~ ^
main.c:16:1: error: expected expression before '}' token
16 | }
| ^
main.c: At top level:
main.c:17:1: error: expected identifier or '(' before 'return'
17 | return 0;
| ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
18 | }
| ^
|
s969199487
|
p00008
|
C
|
#include<stdio.h>
int main(){
int i,j,k,l,a,cnt;
while(scanf("\n%d",&a)!=EOF{)
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(k=0;k<10;k++){
for(l=0;l<10;l++){
if(i+j+k+l==a){
cnt++;
}
}
}
}
}
printf("%d\n",cnt);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:28: error: expected ')' before '{' token
5 | while(scanf("\n%d",&a)!=EOF{)
| ~ ^
main.c:19:1: error: expected expression before '}' token
19 | }
| ^
main.c: At top level:
main.c:20:1: error: expected identifier or '(' before 'return'
20 | return 0;
| ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
21 | }
| ^
|
s137000062
|
p00008
|
C
|
include<stdio.h>
int main()
{
int a[]={0,1,2,3,4,5,6,7,8,9};
int b[]={0,1,2,3,4,5,6,7,8,9};
int c[]={0,1,2,3,4,5,6,7,8,9};
int d[]={0,1,2,3,4,5,6,7,8,9};
int i,j,k,x;
int n,co;
while(scanf("%d",&n)!='\0'){
co=0;
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(k=0;k<10;k++){
for(x=0;x<10;x++){
if(n==a[i]+b[j]+c[k]+d[x])co++;
}
}
}
}
printf("%d",co);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s584664228
|
p00008
|
C
|
include<stdio.h>
int main()
{
int a[]={0,1,2,3,4,5,6,7,8,9};
int b[]={0,1,2,3,4,5,6,7,8,9};
int c[]={0,1,2,3,4,5,6,7,8,9};
int d[]={0,1,2,3,4,5,6,7,8,9};
int i,j,k,x;
int n,co;
while(scanf("%d",&n)!='\0'){
co=0;
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(k=0;k<10;k++){
for(x=0;x<10;x++){
if(n==a[i]+b[j]+c[k]+d[x])co++;
}
}
}
}
printf("%d",co);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s210993131
|
p00008
|
C
|
include<stdio.h>
int main()
{
int a[]={0,1,2,3,4,5,6,7,8,9};
int b[]={0,1,2,3,4,5,6,7,8,9};
int c[]={0,1,2,3,4,5,6,7,8,9};
int d[]={0,1,2,3,4,5,6,7,8,9};
int i,j,k,x;
int n,co;
while(scanf("%d",&n)!=EOF){
co=0;
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(k=0;k<10;k++){
for(x=0;x<10;x++){
if(n==a[i]+b[j]+c[k]+d[x])co++;
}
}
}
}
printf("%d",co);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s216252068
|
p00008
|
C
|
include<stdio.h>
int main()
{
int a[]={0,1,2,3,4,5,6,7,8,9};
int b[]={0,1,2,3,4,5,6,7,8,9};
int c[]={0,1,2,3,4,5,6,7,8,9};
int d[]={0,1,2,3,4,5,6,7,8,9};
int i,j,k,x;
int n,co;
while(scanf("%d",&n)!='\0'){
co=0;
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(k=0;k<10;k++){
for(x=0;x<10;x++){
if(n==a[i]+b[j]+c[k]+d[x])co++;
}
}
}
}
printf("%d",co);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s921953644
|
p00008
|
C
|
#include <stdio.h>
int main(void)
{
int a, b, c, d;
int count;
int n;
while(scanf("%d",&n)=!EOF){
for(a=0;a<=9;a++){
for(b=0;b<=9;b++){
for(c=0;c<=9;c++){
for(d=0;d<=9;d++){
if(a+b+c+d=n){
count++;
}
}
}
}
}
printf("%d",count);
}
return (0);
}
|
main.c: In function 'main':
main.c:9:25: error: lvalue required as left operand of assignment
9 | while(scanf("%d",&n)=!EOF){
| ^
main.c:14:51: error: lvalue required as left operand of assignment
14 | if(a+b+c+d=n){
| ^
|
s188961093
|
p00008
|
C
|
#include<stdio.h>
int main() {
int a, b, c, d, n, k;
while (scanf("%d", &n) != EOF) {
k = 0
for (a = 0; a < 10; a ++) {
for (b = 0; b < 10; a ++) {
for (c = 0; c < 10; c ++) {
for (d = 0;d < 10; d ++) {
if (a + b + c + d == n) k ++;
}
}
}
}
printf("%d\n", k);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:10: error: expected ';' before 'for'
5 | k = 0
| ^
| ;
6 | for (a = 0; a < 10; a ++) {
| ~~~
|
s576969951
|
p00008
|
C
|
#include<stdio.h>
#define DATA 200
int main(){
int a, b, c, d;
int n[DATA];
int i=0, j, com = 0;
while (scanf_s("%d", &n[i]) != EOF)
i++;
for (j = 0; j < i; j++){
for (a = 0; a <= 9; a++){
for (b = 0; b <= 9; b++){
for (c = 0; c <= 9; c++){
for (d = 0; d <= 9; d++){
if (a + b + c + d == n[j])
com++;
}
}
}
}
printf("%d\n", com);
com = 0;
}
return 0;
}
|
main.c: In function 'main':
main.c:9:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | while (scanf_s("%d", &n[i]) != EOF)
| ^~~~~~~
| scanf
|
s871293538
|
p00008
|
C
|
#include <stdio.h.
int main(void)
{
int i = 0, j = 0, k = 0, l = 0;
int n;
int count = 0;
while (scanf("%d", &n) != EOF)
{
for (i = 0; i < 9; i++){
if (n < i + j + k + l) break;
for (j = 0; j < 9; j++){
if (n < i + j + k + l) break;
for (k = 0; k < 9; k++){=
if (n < i + j + k + l) break;
for (l = 0; l < 9; l++){
if (n < i + j + k + l) break;
if (n == i + j + k + l){
count++;
}
}
}
}
}
printf("%d\n", count);
}
|
main.c:1:19: error: missing terminating > character
1 | #include <stdio.h.
| ^
main.c:1:10: fatal error: stdio.h.: No such file or directory
1 | #include <stdio.h.
| ^
compilation terminated.
|
s677250784
|
p00008
|
C
|
#include <stdio.h.
int main(void)
{
int i = 0, j = 0, k = 0, l = 0;
int n;
int count = 0;
while (scanf("%d", &n) != EOF)
{
for (i = 0; i <= 9; i++){
if (n < i + j + k + l) break;
for (j = 0; j <= 9; j++){
if (n < i + j + k + l) break;
for (k = 0; k <= 9; k++){=
if (n < i + j + k + l) break;
for (l = 0; l <= 9; l++){
if (n < i + j + k + l) break;
if (n == i + j + k + l){
count++;
}
}
}
}
}
printf("%d\n", count);
}
return 0;
}
|
main.c:1:19: error: missing terminating > character
1 | #include <stdio.h.
| ^
main.c:1:10: fatal error: stdio.h.: No such file or directory
1 | #include <stdio.h.
| ^
compilation terminated.
|
s057961314
|
p00008
|
C
|
#include <stdio.h.
int main(void)
{
int i = 0, j = 0, k = 0, l = 0;
int n;
int count = 0;
while (scanf("%d", &n) != EOF)
{
for (i = 0; i <= 9; i++){
if (n < i + j + k + l) break;
for (j = 0; j <= 9; j++){
if (n < i + j + k + l) break;
for (k = 0; k <= 9; k++){
if (n < i + j + k + l) break;
for (l = 0; l <= 9; l++){
if (n < i + j + k + l) break;
if (n == i + j + k + l) count++;
}
}
}
}
printf("%d\n", count);
}
return 0;
}
|
main.c:1:19: error: missing terminating > character
1 | #include <stdio.h.
| ^
main.c:1:10: fatal error: stdio.h.: No such file or directory
1 | #include <stdio.h.
| ^
compilation terminated.
|
s788791672
|
p00008
|
C
|
#include <stdio.h>
#define N 9
int main(void){
int a, b, c, d, n, counter;
counter = 0;
scanf_s("%d", &n);
for (a = 0; a < N; a++){
for (b = 0; b < N; b++){
for (c = 0; c < N; c++){
for (d = 0; d < N; d++){
if ((a + b + c + d) == n){
counter++;
}
}
}
}
}
printf("%d\n",counter);
return 0;
}
|
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
8 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s817419361
|
p00008
|
C
|
#include<stdio.h>
int main(){
int a,b,c,d,n,x,count;
while((scanf("%d",&n))!=EOF){
for(a=0;a<9;a++){
for(b=0;b<9;b++){
for(c=0;c<9;c++){
for(d=0;d<9;d++){
x=a+b+c+d;
if(x==n){
count++;
}
}
}
}
}
printf("%d",count);
count=0;
x=0;
}
|
main.c: In function 'main':
main.c:21:1: error: expected declaration or statement at end of input
21 | }
| ^
|
s511097804
|
p00008
|
C
|
#include<stdio.h>
int main(){
int a,b,c,d,n,x,count;
while((scanf("%d",&n))!=EOF){
for(a=0;a<9;a++){
for(b=0;b<9;b++){
for(c=0;c<9;c++){
for(d=0;d<9;d++){
x=a+b+c+d;
if(x==n){
count++;
}
}
}
}
}
printf("%d",count);
count=0;
x=0;
return 0;
}
|
main.c: In function 'main':
main.c:22:1: error: expected declaration or statement at end of input
22 | }
| ^
|
s679520115
|
p00008
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{int n[100],a,b,c,d,an[100],nu,t=0,i;
while(scanf("%d",&n[t]) != EOF){
t++;
}
for(i=0;i<t;i++){
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a + b + c +d == n[i]){
an[i]++;
}
}
}
}
}
}
for(i=0;i<t;i++){
print("%d",an[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:27:17: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
27 | print("%d",an[i]);
| ^~~~~
| lrint
|
s948926083
|
p00008
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{int n[100],a,b,c,d,an[100],nu,t=0,nn,i;
while(scanf("%d",&nn) != EOF){
n[t] = nn;
t++;
}
for(i=0;i<t;i++){
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a + b + c +d == n[i]){
an[i]++;
}
}
}
}
}
}
for(i=0;i<t;i++){
print("%d",an[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:27:17: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
27 | print("%d",an[i]);
| ^~~~~
| lrint
|
s445505116
|
p00008
|
C
|
#include<stdio.h>
int main(){
int n, i, j, k, l;
while(scanf("%d", &n) != EOF){
int cnt = 0;
for(i=0; i<10; i++){
for(j=0; j<10; j++){
for(k=0; k<10; k++){
for(l=0; l<10; l++){
m=i+j+k+l;
if(m==n) cnt++;
}
}
}
}
printf("%d\n", cnt);
}
}
|
main.c: In function 'main':
main.c:12:25: error: 'm' undeclared (first use in this function)
12 | m=i+j+k+l;
| ^
main.c:12:25: note: each undeclared identifier is reported only once for each function it appears in
|
s483263062
|
p00008
|
C
|
#include<stdio.h>
int main(void){
int i,n,a,b,c,d;
i=0;
while(scanf("%d",&n)!=EOF){
for(a=0;a<10;a++)
for(b=0;b<10;b++)
for(c=0;c<10;c++)
for (d=0;d<10;d++)
if(a+b+c+d==n)i++;
}
printf("%d\n",i);
}
return 0;
}
|
main.c:16:1: error: expected identifier or '(' before 'return'
16 | return 0;
| ^~~~~~
main.c:17:1: error: expected identifier or '(' before '}' token
17 | }
| ^
|
s637023041
|
p00008
|
C
|
/****************************************************************************************
* Md. Abdulla Al Mamun (Nayon)
* ID: 1306001
* Session: 2013-2014
* Department of Computer Science and Engineering
* Begum Rokeya University, Rangpur (BRUR)
*
* Project Name: Add All
* File Created: Wednesday, 2015-10-28-19.47.42
* Current File: D:\My Codes\C and C++\Code-Blocks Projects\Add All\main.cpp
* Language: English (U.S.)
* Encoding: windows-1252
*****************************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <ios>
#include <set>
#include <map>
using namespace std;
#define PI acos(-1.0)
#define EPS 1e-9
#define INF 1 << 28
#define all(x) (x).begin(), (x).end()
#define pb() push_back()
#define ppb pop_back
#define mp(a, b) make_pair(a, b)
#define endl '\n'
#define MAX 100000
typedef pair<int, int> pii;
//#define isValid(a, b) ((a >= 0 && a < b) ? 1 : 0)
//int dr[] = {0, -1, -1, -1, 0, 1, 1, 1};
//int dc[] = {1, 1, 0, -1, -1, -1, 0, 1};
int main()
{
//freopen("in.txt", "r", stdin);
//ios_base::sync_with_stdio(false); cin.tie(NULL);
int n;
while(cin >> n){
if(n > 36)
cout << 0 << endl;
else{
int c = 0;
for(int i = 0; i <10; i++){
for(int j = 0; j < 10; j++){
for(int k = 0; k < 10; k ++){
for(int l = 0; l < 10; l++){
if(i+j+k+l == n)
c++;
}
}
}
}
cout << c <<endl;
}
}
return 0;
}
|
main.c:19:10: fatal error: algorithm: No such file or directory
19 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s821334770
|
p00008
|
C
|
/****************************************************************************************
* Md. Abdulla Al Mamun (Nayon)
* ID: 1306001
* Session: 2013-2014
* Department of Computer Science and Engineering
* Begum Rokeya University, Rangpur (BRUR)
*
* Project Name: Add All
* File Created: Wednesday, 2015-10-28-19.47.42
* Current File: D:\My Codes\C and C++\Code-Blocks Projects\Add All\main.cpp
* Language: English (U.S.)
* Encoding: windows-1252
*****************************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <ios>
#include <set>
#include <map>
using namespace std;
#define PI acos(-1.0)
#define EPS 1e-9
#define INF 1 << 28
#define all(x) (x).begin(), (x).end()
#define pb() push_back()
#define ppb pop_back
#define mp(a, b) make_pair(a, b)
#define endl '\n'
#define MAX 100000
typedef pair<int, int> pii;
//#define isValid(a, b) ((a >= 0 && a < b) ? 1 : 0)
//int dr[] = {0, -1, -1, -1, 0, 1, 1, 1};
//int dc[] = {1, 1, 0, -1, -1, -1, 0, 1};
int main()
{
//freopen("in.txt", "r", stdin);
//ios_base::sync_with_stdio(false); cin.tie(NULL);
int n;
while(cin >> n){
if(n > 36)
cout << 0 << endl;
else{
int c = 0;
for(int i = 0; i <10; i++){
for(int j = 0; j < 10; j++){
for(int k = 0; k < 10; k ++){
for(int l = 0; l < 10; l++){
if(i+j+k+l == n)
c++;
}
}
}
}
cout << c <<endl;
}
}
return 0;
}
|
main.c:19:10: fatal error: algorithm: No such file or directory
19 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s662251200
|
p00008
|
C
|
#include<stdio.h>
#include<math.h>
int main(){
int a,b,c,d,n,cnt=0;
while(scanf("%d",&n) !EOF){
if(n>36){
cnt=0;}
else {
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
cnt++;
}
}
}
}
}
printf("%d\n",cnt);
}
}
return 0;}
|
main.c: In function 'main':
main.c:7:25: error: expected ')' before '!' token
7 | while(scanf("%d",&n) !EOF){
| ~ ^~
| )
|
s901965718
|
p00008
|
C
|
int main() {
int n;
int a, b, c, d;
int count;
while (scanf("%d", &n) != EOF) {
count = 0;
for (a = 0; a < 10; a++) {
for (b = 0; b < 10; b++) {
for (c = 0; c < 10; c++) {
for (d = 0; d < 10; d++) {
if (a + b + c + d == n) {
count++;
break;
}
}
}
}
}
printf("%d\n", count);
}
return 0;
}
|
main.c: In function 'main':
main.c:6:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | while (scanf("%d", &n) != EOF) {
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main() {
main.c:6:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
6 | while (scanf("%d", &n) != EOF) {
| ^~~~~
main.c:6:16: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:35: error: 'EOF' undeclared (first use in this function)
6 | while (scanf("%d", &n) != EOF) {
| ^~~
main.c:6:35: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:6:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
20 | printf("%d\n", count);
| ^~~~~~
main.c:20:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:17: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s179581936
|
p00008
|
C
|
//Sum of Integers
#include<stdio.h>
#define MAX_N 10;
int main(void){
int i, j, k, l;
int n;
int count = 0;
scanf("%d", &n);
//??¨??¢?´¢
for(i = 0; i < MAX_N; i++)
for(j = 0; j < MAX_N; j++)
for(k = 0; k < MAX_N; k++)
for(l = 0; l < MAX_N; l++)
if(i + j + k + l == n) count++;
printf("%d\n", count);
return 0;
}
|
main.c: In function 'main':
main.c:14:25: error: expected expression before ';' token
14 | for(i = 0; i < MAX_N; i++)
| ^
main.c:15:29: error: expected expression before ';' token
15 | for(j = 0; j < MAX_N; j++)
| ^
main.c:16:33: error: expected expression before ';' token
16 | for(k = 0; k < MAX_N; k++)
| ^
main.c:17:37: error: expected expression before ';' token
17 | for(l = 0; l < MAX_N; l++)
| ^
|
s800708912
|
p00008
|
C
|
//Sum of Integers
#include<stdio.h>
#define MAX_N 10;
int main(void){
int i, j, k, l;
int n;
int count = 0;
scanf("%d", &n);
//??¨??¢?´¢
for(i = 0; i < MAX_N; i++){
for(j = 0; j < MAX_N; j++){
for(k = 0; k < MAX_N; k++){
for(l = 0; l < MAX_N; l++){
if(i + j + k + l == n) count++;
}
}
}
}
printf("%d\n", count);
return 0;
}
|
main.c: In function 'main':
main.c:14:25: error: expected expression before ';' token
14 | for(i = 0; i < MAX_N; i++){
| ^
main.c:15:29: error: expected expression before ';' token
15 | for(j = 0; j < MAX_N; j++){
| ^
main.c:16:33: error: expected expression before ';' token
16 | for(k = 0; k < MAX_N; k++){
| ^
main.c:17:37: error: expected expression before ';' token
17 | for(l = 0; l < MAX_N; l++){
| ^
|
s125021594
|
p00008
|
C
|
#include <stdio.h>
??
int main(void){
????????int n,a,b,c,d,i=0;
????????scanf("%d",n);
????????for(a=0;a<10;a++){
????????????????for(b=0;b<10;b++){
????????????????????????for(c=0;c<10;c++){
????????????????????????????????for(d=0;d<10;d++){
????????????????????????????????????????if(a+b+c+d==n){
????????????????????????????????????????????????i++;
????????????????????????????????????????}
????????????????????????????????}
????????????????????????}
????????????????}
????????}
????????printf("%d\n",i);
????????return 0;
}
|
main.c:2:1: error: expected identifier or '(' before '?' token
2 | ??
| ^
|
s967072162
|
p00008
|
C
|
#include <stdio.h>
int main(){
int n, a, b, c, d, i;
while (scanf"%d" != EOF){
i = 0;
for(a = o; a <=9; ++a)
for(b = 0; b<= 9; ++b)
for(c = 0; c<= 9; ++c)
for(d = 0; d<= 9; ++d)
if(a + b + c + d == n)
++i;
printf("%d\n", i);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:21: error: expected ')' before string constant
5 | while (scanf"%d" != EOF){
| ~ ^~~~
| )
main.c:7:25: error: 'o' undeclared (first use in this function)
7 | for(a = o; a <=9; ++a)
| ^
main.c:7:25: note: each undeclared identifier is reported only once for each function it appears in
|
s842320903
|
p00008
|
C
|
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int n,count;
while(scanf("%d",&n)){
count=0;
for(int i=0;i<=9;i++){
for(int j=0;j<=9;j++){
for(int k=0;k<=9;k++){
for(int l=0;l<=9;l++){
if(i+j+k+l==n){
count++;
}
}
}
}
}
printf("%d\n",count);
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s415486726
|
p00008
|
C
|
int main(){
int n,count;
int a,b,c,d;
while(scanf("%d",&n) != EOF){
count = 0;
for(a=0;a<=9;a++){
for(b=0;b<=9;b++){
for(c=0;c<=9;c++){
for(d=0;d<=9;d++){
if(a+b+c+d == n)
count++;
}
}
}
}
printf("%d\n",count);
}
return 0;
}
|
main.c: In function 'main':
main.c:4:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | while(scanf("%d",&n) != EOF){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:4:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | while(scanf("%d",&n) != EOF){
| ^~~~~
main.c:4:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:33: error: 'EOF' undeclared (first use in this function)
4 | while(scanf("%d",&n) != EOF){
| ^~~
main.c:4:33: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:4:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
16 | printf("%d\n",count);
| ^~~~~~
main.c:16:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:16:17: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s537004623
|
p00008
|
C
|
#include<stdio.h>
int main(void) {
int i, a, b, c, d, n;
while(scanf("%d", &n) != EOF) {
i = 0;
for(a = 0; a <= 9; a++) {
for(b = 0; b <= 9; b++) {
for(c = 0; c <= 9; c++) {
for(d = 0; d <= 9; d++) {
if(a + b + c + d == n) i++;
}
}
}
}
printf("%d\n", i);
}
return 0;
}
~
|
main.c:22:1: error: expected identifier or '(' before '~' token
22 | ~
| ^
|
s267107006
|
p00008
|
C
|
#include <stdio.h>
int main(void)
{
int a, b, c, d, n;
int cnt;
while (scanf("%d", &n) != EOF){
cnt = 0;
for (a = 0; a <= 9; a++){
for (b = 0; b <= 9; b++){
for (c = 0; c <= 9; c++){
for (d = 0; d <= 9; d++){
if ((a + b + c + d) == n){
cnt++;
}
}
}
}
}
printf("%d\n", cnt);
}
return (0);
}
#include <stdio.h>
int main(void)
{
int a, b, c, d, n;
int cnt;
while (scanf("%d", &n) != EOF){
cnt = 0;
for (a = 0; a <= 9; a++){
for (b = 0; b <= 9; b++){
for (c = 0; c <= 9; c++){
for (d = 0; d <= 9; d++){
if ((a + b + c + d) == n){
cnt++;
}
}
}
}
}
printf("%d\n", cnt);
}
return (0);
}
|
main.c:27:5: error: redefinition of 'main'
27 | int main(void)
| ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
3 | int main(void)
| ^~~~
|
s021431771
|
p00008
|
C
|
#include<stdio.h>
int main(void)
{
int i,n,a,b,c,number=0;
for(i=0;i<50,i++)
{
scanf("%d",&n);
for(a=0;a<10;a++)
{
for(b=0;b<10;b++)
{
for(c=0;c<10;c++)
{
if(n-a-b-c>=0 && n-a-b-c<=9) number++;
}
}
}
printf("%d\n",number);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:17: error: expected ';' before ')' token
5 | for(i=0;i<50,i++)
| ^
| ;
|
s629695071
|
p00008
|
C
|
#include <stdio.h>
int main(void){
int a, b, c, d, count, n;
while(scanf("%d", &n) != EOF){
count = 0;
for(a = 0; a < 10; a ++){
for(b = 0; b < 10; b ++){
for(c = 0; c < 10; c ++){
for(d = 0; d < 10; d ++){
if(a + b + c + d == n)
count ++;
}
}
}
}
printf("%d\n", count);
}
|
main.c: In function 'main':
main.c:18:3: error: expected declaration or statement at end of input
18 | }
| ^
|
s654090820
|
p00008
|
C
|
#include <stdio.h>
int main(){
int n,ans;
while( cin >> n ){
ans = 0;
if(n<=36){
for(int a=0 ; a<=9 ; a++){
for(int b=0 ; b<=9 ; b++){
for(int c=0 ; c<=9 ; c++){
for(int d=0 ; d<=9 ; d++){
if((a+b+c+d)==n){
ans++;
}
}
}
}
}
}
printf("%d",ans);
}
}
|
main.c: In function 'main':
main.c:6:16: error: 'cin' undeclared (first use in this function)
6 | while( cin >> n ){
| ^~~
main.c:6:16: note: each undeclared identifier is reported only once for each function it appears in
|
s902464305
|
p00008
|
C
|
#include <stdio.h>
int main(){
int n,ans,a,b,c,d;
while( cin >> n ){
ans = 0;
if(n<=36){
for(a=0 ; a<=9 ; a++){
for(b=0 ; b<=9 ; b++){
for(c=0 ; c<=9 ; c++){
for(d=0 ; d<=9 ; d++){
if((a+b+c+d)==n){
ans++;
}
}
}
}
}
}
printf("%d",ans);
}
}
|
main.c: In function 'main':
main.c:6:16: error: 'cin' undeclared (first use in this function)
6 | while( cin >> n ){
| ^~~
main.c:6:16: note: each undeclared identifier is reported only once for each function it appears in
|
s913655919
|
p00008
|
C
|
#include <stdio.h>
int main(void)
{
int a,b,c,d,n;
int i,j,l,k;
int p = 0;
while(scanf("%d",&n) != EOF){
for(a = 0;a <= 9;a++){
for(b = 0;b <= 9;b++){
for(c = 0;c <= 9;c++){
for(d = 0;d <= 9;d++){
if(a+b+c+d == n){
p++;
}
}
}
}
}
printf("%d\n",p);
return(0);
}
|
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s057116959
|
p00008
|
C
|
include <stdio.h>
int main(){
printf("4\n4\n");
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s936817894
|
p00008
|
C
|
#include<stdio.h>
int main(void){
int n, a, b, c, d, sum, key;
while(scanf("%d", n) != EOF){
key = 0;
for(a = 0; a <= n; a++){
for(b = 0; b <= n; b++){
for(c = 0; c <= n; c++){
for(d = 0; d <= n; d++);
if(n == a + b + c + d){
key++;
}
}
}
}
}
printf("%d", key);
}
return 0;
}
|
main.c:19:4: error: expected identifier or '(' before 'return'
19 | return 0;
| ^~~~~~
main.c:20:1: error: expected identifier or '(' before '}' token
20 | }
| ^
|
s642143737
|
p00008
|
C
|
#include <stdio.h>
int main(void){
int a, b, c, d;
int n, i=0;
while(scanf("%d",&n) != EOF){
for(a=0; a<=9; a++);
for(b=0; b<=9; b++);
for(c=0; c<=9; c++);
for(d=0; d<=9; d++);
if(a+b+c+d = n){
i = i + 1;
}
}
printf("%d",i);
return 0;
}
|
main.c: In function 'main':
main.c:13:60: error: lvalue required as left operand of assignment
13 | if(a+b+c+d = n){
| ^
|
s407494102
|
p00008
|
C
|
include<stdio.h>
int main(){
int n,i,j,k,l;
int s1,s2,s3,s4;
int count=0;
scanf("%d",&n);
for(i=0;i<=9;i++){
for(j=0;j<=9;j++){
for(k=0;k<=9;k++){
for(l=0;l<=9;l++){
if(i+j+k+l==n) count++;
}
}
}
}
printf("%d\n",count);
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s000947213
|
p00008
|
C
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, a, b, c, d, tot;
while (cin >> n) {
tot = 0;
if (n > 36) {
printf("0\n");
continue;
}
n = n > 18 ? 36 - n : n;
for (int x = 0; x < 10; x++) {
for (int y = 0; x + y <= n && y < 10; y++) {
for (int z = 0; x + y + z <= n && z < 10; z++) {
for (int w = 0; x + y + z + w <= n && w < 10; w++) {
if (x + y + z + w == n) {
tot++;
}
}
}
}
}
printf("%d\n", tot);
}
return 0;
}
|
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s138278505
|
p00008
|
C
|
#include<stdio.h>
int main(void){
int a,b,c,d,n;
int count;
while(scanf("%d",&n)!=EOF){
count=0;
for(a=0;a<=9;a++){
for(b=0;b<=9;b++){
for(c=0;c<=9;c++){
for(d=0;d<=9;d++){
if(a+b+c+d==n){
count++;
}
}
}
}
}return 0;
}
|
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
18 | }
| ^
|
s946559509
|
p00008
|
C
|
#include<stdio.h>
int main(void){
int a,b,c,d,n;
int count;
while(scanf("%d",&n)!=EOF){
count=0;
for(a=0;a<=9;a++){
for(b=0;b<=9;b++){
for(c=0;c<=9;c++){
for(d=0;d<=9;d++){
if(a+b+c+d==n){
count++;
}
}
}
}
}
}
printf("%d",count\n);
return 0;
}
|
main.c: In function 'main':
main.c:19:18: error: stray '\' in program
19 | printf("%d",count\n);
| ^
main.c:19:18: error: expected ')' before 'n'
19 | printf("%d",count\n);
| ~ ^~
| )
|
s663778591
|
p00008
|
C
|
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
|
s891512057
|
p00008
|
C
|
#include <stdio.h>
int main(){
int n;
while(scanf("%d",&n) != EOF){
int i,j,k,l,count;
ツ ツ count = 0;
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(k=0;k<10;k++){
for(l=0;l<10;l++){
if(n == i+j+k+l) count++;
}
}
}
}
printf("%d\n",count);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:3: error: stray '\343' in program
7 | <U+30C4><U+3000><U+30C4><U+3000>count = 0;
| ^~~~~~~~
main.c:7:1: error: unknown type name '\U000030c4'
7 | ツ ツ count = 0;
| ^~
main.c:7:7: error: stray '\343' in program
7 | <U+30C4><U+3000><U+30C4><U+3000>count = 0;
| ^~~~~~~~
main.c:7:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'count'
7 | ツ ツ count = 0;
| ^~~~~
|
s114146806
|
p00008
|
C
|
#include <algorithm>
#include <iostream>
using namespace std;
int main(){
int n;
while(cin >> n){
int output = 0;
for(int a=0;a<=9;a++){
for(int b=0;b<=9;b++){
for(int c=0;c<=9;c++){
for(int d=0;d<=9;d++){
if(a+b+c+d==n){
output++;
}
}
}
}
}
cout << output << endl;
}
}
|
main.c:1:10: fatal error: algorithm: No such file or directory
1 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s948316823
|
p00008
|
C
|
int a,i,j;
main(){
for(;~scanf("%d",&i);){
for(a=9999;a--;)
(a%10+a/10%10+a/100%10+1\a/1000-i)?0;j++
printf("%d\n",j);
}
}
|
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | for(;~scanf("%d",&i);){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int a,i,j;
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | for(;~scanf("%d",&i);){
| ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:31: error: stray '\' in program
5 | (a%10+a/10%10+a/100%10+1\a/1000-i)?0;j++
| ^
main.c:5:31: error: expected ')' before 'a'
5 | (a%10+a/10%10+a/100%10+1\a/1000-i)?0;j++
| ~ ^~
| )
main.c:5:43: error: expected ':' before ';' token
5 | (a%10+a/10%10+a/100%10+1\a/1000-i)?0;j++
| ^
| :
main.c:5:47: error: expected ';' before 'printf'
5 | (a%10+a/10%10+a/100%10+1\a/1000-i)?0;j++
| ^
| ;
6 | printf("%d\n",j);
| ~~~~~~
|
s050873422
|
p00008
|
C
|
main(n){int a[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670};for(;~scanf("%d",&n);printf("%d\n",a[n])n=fmin(n,36-n);}
|
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(n){int a[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670};for(;~scanf("%d",&n);printf("%d\n",a[n])n=fmin(n,36-n);}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:92: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | main(n){int a[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670};for(;~scanf("%d",&n);printf("%d\n",a[n])n=fmin(n,36-n);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(n){int a[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670};for(;~scanf("%d",&n);printf("%d\n",a[n])n=fmin(n,36-n);}
main.c:1:92: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | main(n){int a[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670};for(;~scanf("%d",&n);printf("%d\n",a[n])n=fmin(n,36-n);}
| ^~~~~
main.c:1:92: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:107: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | main(n){int a[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670};for(;~scanf("%d",&n);printf("%d\n",a[n])n=fmin(n,36-n);}
| ^~~~~~
main.c:1:107: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:107: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:107: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:126: error: expected ')' before 'n'
1 | main(n){int a[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670};for(;~scanf("%d",&n);printf("%d\n",a[n])n=fmin(n,36-n);}
| ~ ^
| )
main.c:1:141: error: expected expression before '}' token
1 | main(n){int a[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670};for(;~scanf("%d",&n);printf("%d\n",a[n])n=fmin(n,36-n);}
| ^
|
s015372062
|
p00008
|
C
|
import java.io.*;
class Sumof4Integers
{
public static void main(String args[])throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
for(;;)
{
int cnt=0;
String str_n = br.readLine();
if(str_n==null) break;
int n = Integer.parseInt(str_n);
for(int a = 0; a <= 9; a++)
{
for(int b = 0; b <= 9; b++)
{
for(int c = 0; c <= 9; c++)
{
for(int d = 0; d <= 9; d++)
{
if(a+b+c+d==n)
cnt++;
}
}
}
}
System.out.println(cnt);
}
}
|
main.c:1:1: error: unknown type name 'import'
1 | import java.io.*;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.io.*;
| ^
main.c:3:1: error: unknown type name 'class'
3 | class Sumof4Integers
| ^~~~~
main.c:4:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
4 | {
| ^
|
s871318279
|
p00008
|
C
|
#include <stdio.h>
int main(){
int a,b,i,j,k,l;
b=0;
while(scanf("%d",&a)!=EOF){
for(i=0;i<=9;i++){
for(j=0;j<=9;j++){
for(k=0;k<=9;k++){
for(l=0;l<=9;l++){
if(a==(i+j+k+l)){
b++;break;
}
}}}}
printf("%d\n",b);
return 0;
}
|
main.c: In function 'main':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s992165197
|
p00008
|
C
|
#include <stdio.h> int main() { int i,j,k,l,c,n; while(scanf("%d", &n) != EOF) { c = 0; for(i = 0; i <= 9; i++) for(j = 0; j <= 9; j++) for(k = 0; k <= 9; k++) for(l = 0; l <= 9; l++) if(i+j+k+l == n) c++; printf("%d\n", c); }}
|
main.c:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> int main() { int i,j,k,l,c,n; while(scanf("%d", &n) != EOF) { c = 0; for(i = 0; i <= 9; i++) for(j = 0; j <= 9; j++) for(k = 0; k <= 9; k++) for(l = 0; l <= 9; l++) if(i+j+k+l == n) c++; printf("%d\n", c); }}
| ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s157872156
|
p00008
|
C
|
力用
int a,b,c,d;
int cnt;
while(scanf("%d",&n)!=EOF){
cnt=0;
for(a=0;a<=9;a++){
for(b=0;b<=9;b++){
for(c=0;c<=9;c++){
for(d=0;d<=9;d++){
if(a+b+c+d == n){
cnt++;
}
}
}
}
}
printf("%d\n",cnt);
}
return 0;
}
|
main.c:1:5: error: expected ';' before 'int'
1 | 力用
| ^
| ;
2 | int a,b,c,d;
| ~~~
main.c:5:5: error: expected identifier or '(' before 'while'
5 | while(scanf("%d",&n)!=EOF){
| ^~~~~
main.c:21:5: error: expected identifier or '(' before 'return'
21 | return 0;
| ^~~~~~
main.c:22:1: error: expected identifier or '(' before '}' token
22 | }
| ^
|
s997977859
|
p00008
|
C
|
#include <stdio.h>
int A[51];
void make_table();
int main(){
int a;
make_table();
while(scanf("%d",&a)!=EOF)printf("%d\n",A[a]);
return 0;
}
void make_table(){
int i,j,k,l;
for(i=0;i<=9;i++){
for(i=0;j<=9;j++){
for(i=0;k<=9;k++){
for(i=0;l<=9;l++){
A[i+j+k+l]++;
}
}
}
}
|
main.c: In function 'make_table':
main.c:25:9: error: expected declaration or statement at end of input
25 | }
| ^
|
s315490477
|
p00008
|
C
|
#include <stdio.h>
int main(void){
int n;a,b,c,d,ans;
while(scanf("%d",&n)!=EOF){
ans =0;
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d == n)
ans++:
}
}
}
}
printf("%d\n",ans);
}
return 0;
}
|
main.c: In function 'main':
main.c:3:10: error: 'a' undeclared (first use in this function)
3 | int n;a,b,c,d,ans;
| ^
main.c:3:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:12: error: 'b' undeclared (first use in this function)
3 | int n;a,b,c,d,ans;
| ^
main.c:3:14: error: 'c' undeclared (first use in this function)
3 | int n;a,b,c,d,ans;
| ^
main.c:3:16: error: 'd' undeclared (first use in this function)
3 | int n;a,b,c,d,ans;
| ^
main.c:3:18: error: 'ans' undeclared (first use in this function)
3 | int n;a,b,c,d,ans;
| ^~~
main.c:11:26: error: expected ';' before ':' token
11 | ans++:
| ^
| ;
|
s134473370
|
p00008
|
C
|
#include <stdio.h>
int main(void){
int n,a,b,c,d,ans;
while(scanf("%d",&n)!=EOF){
ans =0;
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d == n)
ans++:
}
}
}
}
printf("%d\n",ans);
}
return 0;
}
|
main.c: In function 'main':
main.c:11:26: error: expected ';' before ':' token
11 | ans++:
| ^
| ;
|
s675559739
|
p00008
|
C
|
#include <stdio.h>
int main()
{
int i,j,k,l,n,cnt;
while(scanf("%d",&n)!=EOF){
cnt=0;
for(i=9;i>=0;i--){
for(=9;j>=0;j--);{
for(k=9;k>=0;k--){
for(l=9;l>=0;l--){
if(i+j+k+l==n){
cnt++;
}
}
}
}
}
printf("%d\n",cnt);
}
return 0;
}
|
main.c: In function 'main':
main.c:10:29: error: expected expression before '=' token
10 | for(=9;j>=0;j--);{
| ^
|
s250365118
|
p00008
|
C
|
#include<stdio.h>
int main(void){
int n,h,a,b,c,d;
while(scanf("%d",&n)!=EOF){
h=0;
for(a=0; a<10; a++){
for(b=0; b<10; b++){
for(c=0; c<10; c++){
for(d=0; d<10; d++){
if((a+b+c+d)=n){
h++;
}
}
}
}
}
printf("%d",h);
}
return 0;
}
|
main.c: In function 'main':
main.c:10:37: error: lvalue required as left operand of assignment
10 | if((a+b+c+d)=n){
| ^
|
s077253024
|
p00008
|
C
|
#include <stdio.h>
int main()
{
int a,b,c,d,n;
while(scanf("%d",&n)!=EOF){
count = 0;
for(a=0; a<10; a++){
for(b=0; b<10; b++){
for(c=0; c<10; c++){
for(d=0; d<10; d++){
if((a+b+c+d)==n) count ++;
}
}
}
}
printf("%d\n",count);
}
return 0;
}
|
main.c: In function 'main':
main.c:6:2: error: 'count' undeclared (first use in this function)
6 | count = 0;
| ^~~~~
main.c:6:2: note: each undeclared identifier is reported only once for each function it appears in
|
s868781167
|
p00008
|
C
|
#include <stdio.h>
int main(void)
{
int n, a, b, c, d, count;
while(scanf("%d", &n) != EOF){
count = 0;
for(a = 0; a < 10; a++){
if(a > n) break;
for(b = 0; b < 10; b++){
if(a + b > n) break;
for(c = 0; c < 10; c++){
if(a + b + c > n) break;
for(d = 0; d < 10; d++){
if(a + b + c + d == n){
count++;
break;
}
}
}
}
}
printf("%d\n", count);
return 0;
}
|
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s070071271
|
p00008
|
C
|
#include <stdio.h> int main( void ) { int n = 0; while( scanf( "%d", &n ) != EOF ) { if( n <= 36 ) //a+b+c+dがとれる最大の数は36なので分岐 { int a = 0, b = 0, c = 0, d = 0; int Count = 0; for( a = 0 ; a <= 9 ; a ++ ) //計算量は最悪でも81*81回なので全探索で十分 for( b = 0 ; b <= 9 ; b ++ ) for( c = 0 ; c <= 9 ; c ++ ) for( d = 0 ; d <= 9 ; d ++ ) if( n == a + b + c + d ) Count ++; printf( "%d\n", Count ); } else //36より大きいならば0通り { printf( "0\n" ); } } return 0; }
|
main.c:1:22: warning: extra tokens at end of #include directive
1 | #include <stdio.h> int main( void ) { int n = 0; while( scanf( "%d", &n ) != EOF ) { if( n <= 36 ) //a+b+c+dがとれる最大の数は36なので分岐 { int a = 0, b = 0, c = 0, d = 0; int Count = 0; for( a = 0 ; a <= 9 ; a ++ ) //計算量は最悪でも81*81回なので全探索で十分 for( b = 0 ; b <= 9 ; b ++ ) for( c = 0 ; c <= 9 ; c ++ ) for( d = 0 ; d <= 9 ; d ++ ) if( n == a + b + c + d ) Count ++; printf( "%d\n", Count ); } else //36より大きいならば0通り { printf( "0\n" ); } } return 0; }
| ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s079083795
|
p00008
|
C
|
#include<stdio.h>
int main(){
int i,j,k,l,n,a=0;
scanf("%d",&n);
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(k=0;k<10;k++){
for(l=0;l<10;l++){
if(i+j+k+l==n){
a++;
}
}
}
}
}
printf("%d\n",a);
return 0;
}
AC
|
main.c:19:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
19 | AC
| ^~
|
s125187068
|
p00008
|
C
|
#include<stdio.h>
int main(void)
{
int a, b, c, d;
int n;
while(scanf("%d", &n) != EOF)
{
int cnt = 0;
for(a = 0; a < 10; ++a)
for(b = 0; b < 10; ++b)
for(c = 0; c < 10; ++c)
for(d = 0; d < 10; ++d)
if((a + b + c + d) == n)
++cnt;
printf("%d\n", cnt);
}
}
return 0;
}
|
main.c:21:9: error: expected identifier or '(' before 'return'
21 | return 0;
| ^~~~~~
main.c:22:1: error: expected identifier or '(' before '}' token
22 | }
| ^
|
s794511783
|
p00008
|
C
|
#include<stdio.h>
int main(void){
int n,ans=0;
scanf_s("%d",&n);
for(int a=0;a<10;a++){
for(int b=0;b<10;b++){
for(int c=0;c<10;c++){
for(int d=0;d<10;d++){
if(n==(a+b+c+d))
ans++;
}
}
}
}
printf("%d",ans);
return 0;
}
|
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d",&n);
| ^~~~~~~
| scanf
|
s657696675
|
p00008
|
C
|
#include <stdio.h>
int main(void) {
// your code goes here
int z, a,b,c,d,ans=0;
while(scanf("%d",&z)!=EOF) {
for(a = 0;a < 10; a++) {
for(b=0;b < 10; b++) {
for(c=0;c < 10; c++) {
for (d=0;d < 10; d++) {
if((a+b+c+d) == z) {
ans += 1;
}
}
}
}
}
printf("%d",ans);
ans = 0;
}
return 0;
}
#include <stdio.h>
int main(void) {
// your code goes here
int z, a,b,c,d,ans=0;
while(scanf("%d",&z)!=EOF) {
for(a = 0;a < 10; a++) {
for(b=0;b < 10; b++) {
for(c=0;c < 10; c++) {
for (d=0;d < 10; d++) {
if((a+b+c+d) == z) {
ans += 1;
}
}
}
}
}
printf("%d\n",ans);
ans = 0;
}
return 0;
}
|
main.c:26:5: error: redefinition of 'main'
26 | int main(void) {
| ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
3 | int main(void) {
| ^~~~
|
s045121362
|
p00008
|
C
|
include<stdio.h>
#include<math.h>
#include<string.h>
int main(void)
{
int n;
for(;scanf("%d",&n)!=EOF;){
int a,b,c;
int count=0;
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++)
if(n-a-b-c>=0 && n-a-b-c<10)
count+=1;
}
}
printf("%d\n",count);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
main.c: In function 'main':
main.c:8:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
8 | for(;scanf("%d",&n)!=EOF;){
| ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
3 | #include<string.h>
+++ |+#include <stdio.h>
4 | int main(void)
main.c:8:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
8 | for(;scanf("%d",&n)!=EOF;){
| ^~~~~
main.c:8:8: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:24: error: 'EOF' undeclared (first use in this function)
8 | for(;scanf("%d",&n)!=EOF;){
| ^~~
main.c:8:24: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:8:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
18 | printf("%d\n",count);
| ^~~~~~
main.c:18:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:5: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s839989499
|
p00008
|
C
|
scanf("%d",&n);
|
main.c:1:7: error: expected declaration specifiers or '...' before string constant
1 | scanf("%d",&n);
| ^~~~
main.c:1:12: error: expected declaration specifiers or '...' before '&' token
1 | scanf("%d",&n);
| ^
|
s951232097
|
p00008
|
C++
|
#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int a;
while (cin>>a)
{
int ans =0;
for (int i = 0; i < 10; ++i)
{
for (int j = 0; j < 10; ++j)
{
for (int k= 0; k < 10; ++k)
{
for (int l = 0; l < 10; ++l)
{
if (i+j+k+l == a) ans++;
}
}
}
}
}
cout<<ans;
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:23:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
23 | cout<<ans;
| ^~~
| abs
|
s333514242
|
p00008
|
C++
|
#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int a;
while (cin>>a)
{
int ans =0;
for (int i = 0; i < 10; ++i)
for (int j = 0; j < 10; ++j)
for (int k= 0; k < 10; ++k)
for (int l = 0; l < 10; ++l)
if (i+j+k+l == a) ans++;
}
cout<<ans;
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:23:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
23 | cout<<ans;
| ^~~
| abs
|
s926929387
|
p00008
|
C++
|
using System;
class aoj
{
static void Main()
{
int[] ans = new int[50];
for (int i=0; i < 10; i++)
{
for (int j=0; j < 10; j++)
{
for (int k=0; k < 10; k++)
{
for (int l=0; l < 10; l++)
{
ans[i + j + k +l] += 1;
}
}
}
}
while (true)
{
string input = Console.ReadLine();
if (input == null) { break; }
int inputNumber = int.Parse(input);
Console.WriteLine(ans[inputNumber]);
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:31:2: error: expected ';' after class definition
31 | }
| ^
| ;
a.cc: In static member function 'static void aoj::Main()':
a.cc:7:20: error: structured binding declaration cannot have type 'int'
7 | int[] ans = new int[50];
| ^~
a.cc:7:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:7:20: error: empty structured binding declaration
a.cc:7:23: error: expected initializer before 'ans'
7 | int[] ans = new int[50];
| ^~~
a.cc:16:49: error: 'ans' was not declared in this scope
16 | ans[i + j + k +l] += 1;
| ^~~
a.cc:24:25: error: 'string' was not declared in this scope
24 | string input = Console.ReadLine();
| ^~~~~~
a.cc:25:29: error: 'input' was not declared in this scope; did you mean 'int'?
25 | if (input == null) { break; }
| ^~~~~
| int
a.cc:25:38: error: 'null' was not declared in this scope
25 | if (input == null) { break; }
| ^~~~
a.cc:27:43: error: expected primary-expression before 'int'
27 | int inputNumber = int.Parse(input);
| ^~~
a.cc:28:25: error: 'Console' was not declared in this scope
28 | Console.WriteLine(ans[inputNumber]);
| ^~~~~~~
a.cc:28:43: error: 'ans' was not declared in this scope
28 | Console.WriteLine(ans[inputNumber]);
| ^~~
|
s974768075
|
p00008
|
C++
|
#include"iostean.h"
#include<string>
#include<algorithm>
#include<iomanip>
using namespace std;
#define pi 3.141592653589793283462
int main(){
int c;
int d=0;
while (cin>>c)
{
for(int i=0;i<=9;i++){
for(int j=0;j<=9;j++){
for(int k=0;k<=9;k++){
for(int l=0;l<=9;l++){
if(i+j+k+l==c)
d++;
}
}
}
}
}
cout<<d<<endl;
return 0;
}
|
a.cc:1:9: fatal error: iostean.h: No such file or directory
1 | #include"iostean.h"
| ^~~~~~~~~~~
compilation terminated.
|
s116988666
|
p00008
|
C++
|
#include <iostream>
#include <conio.h>
#include <cstdio>
using namespace std;
int main(void)
{
int val,count = 0;
while (scanf_s("%d", &val) != EOF)
{
for (int a = 0; a < 10; a++)
{
for (int b = 0; b < 10; b++)
{
for (int c = 0; c < 10; c++)
{
for (int d = 0; d < 10; d++)
{
if (a + b + c + d == val)count++;
}
}
}
}
printf("%d\n", count);
count = 0;
}
}
|
a.cc:2:10: fatal error: conio.h: No such file or directory
2 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s948637402
|
p00008
|
C++
|
#include <iostream>
#include <cstdio>
using namespace std;
int main(void)
{
int val,count = 0;
while (scanf_s("%d", &val) != EOF)
{
for (int a = 0; a < 10; a++)
{
for (int b = 0; b < 10; b++)
{
for (int c = 0; c < 10; c++)
{
for (int d = 0; d < 10; d++)
{
if (a + b + c + d == val)count++;
}
}
}
}
printf("%d\n", count);
count = 0;
}
}
|
a.cc: In function 'int main()':
a.cc:10:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
10 | while (scanf_s("%d", &val) != EOF)
| ^~~~~~~
| scanf
|
s728931377
|
p00008
|
C++
|
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
while(in.hasNext()){
int n = in.nextInt(), ans = 0;
for(int a = 0; a < 10; a++){
for(int b = 0; b < 10; b++){
for(int c = 0; c < 10; c++){
for(int d = 0; d < 10; d++){
if(a + b + c + d == n) ++ans;
}
}
}
}
System.out.println(ans);
}
}
}
|
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:4:11: error: expected ':' before 'static'
4 | public static void main(String[] args){
| ^~~~~~~
| :
a.cc:4:29: error: 'String' has not been declared
4 | public static void main(String[] args){
| ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
4 | public static void main(String[] args){
| ^~~~
a.cc:20:2: error: expected ';' after class definition
20 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:9: error: 'Scanner' was not declared in this scope
5 | Scanner in = new Scanner(System.in);
| ^~~~~~~
a.cc:6:15: error: 'in' was not declared in this scope; did you mean 'int'?
6 | while(in.hasNext()){
| ^~
| int
a.cc:12:54: error: 'ans' was not declared in this scope
12 | if(a + b + c + d == n) ++ans;
| ^~~
a.cc:17:13: error: 'System' was not declared in this scope
17 | System.out.println(ans);
| ^~~~~~
a.cc:17:32: error: 'ans' was not declared in this scope
17 | System.out.println(ans);
| ^~~
|
s918412227
|
p00008
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
while (true)
{
var str = Console.ReadLine();
if (string.IsNullOrEmpty(str)) return;
Console.WriteLine(pattern(int.Parse(str)));
}
}
static int pattern(int n)
{
int ret = 0;
for (int a = 0; a <= 9; a++)
{
for (int b = 0; b <= 9; b++)
{
for (int c = 0; c <= 9; c++)
{
for (int d = 0; d <= 9; d++)
{
if (a + b + c + d == n)
ret++;
}
}
}
}
return ret;
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:10:26: error: 'string' has not been declared
10 | static void Main(string[] args)
| ^~~~~~
a.cc:10:35: error: expected ',' or '...' before 'args'
10 | static void Main(string[] args)
| ^~~~
a.cc:39:6: error: expected ';' after class definition
39 | }
| ^
| ;
a.cc: In static member function 'static void ConsoleApplication::Program::Main(int*)':
a.cc:14:17: error: 'var' was not declared in this scope
14 | var str = Console.ReadLine();
| ^~~
a.cc:15:21: error: 'string' was not declared in this scope
15 | if (string.IsNullOrEmpty(str)) return;
| ^~~~~~
a.cc:15:42: error: 'str' was not declared in this scope; did you mean 'std'?
15 | if (string.IsNullOrEmpty(str)) return;
| ^~~
| std
a.cc:16:17: error: 'Console' was not declared in this scope
16 | Console.WriteLine(pattern(int.Parse(str)));
| ^~~~~~~
a.cc:16:43: error: expected primary-expression before 'int'
16 | Console.WriteLine(pattern(int.Parse(str)));
| ^~~
|
s584970973
|
p00008
|
C++
|
#include <iostream>
using namespace std;
int main ()
{
int n;
while (cin >> n) {
int res = 0;
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
for (int k = 0; k <= 9; k++) {
for (int l = 0; l <= 9; l++) {
if (i + j + k + l = n) res++;
}
}
}
}
cout << res << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:39: error: lvalue required as left operand of assignment
14 | if (i + j + k + l = n) res++;
| ~~~~~~~~~~^~~
|
s735042872
|
p00008
|
C++
|
#include <iostream>
#define MAX 10
using namespace std;
int n, res = 0;
void dfs(int sum, int count)
{
if (sum == n) {
res++;
return ;
}
if (num == 4) return;
for (int i = 0; i <= 9; i++) {
dfs(sum + i, count + 1);
}
}
int main(void)
{
while (cin >> n) {
res = 0;
dfs(0, 0);
cout << res << endl;
}
return 0;
}
|
a.cc: In function 'void dfs(int, int)':
a.cc:13:9: error: 'num' was not declared in this scope; did you mean 'sum'?
13 | if (num == 4) return;
| ^~~
| sum
|
s931939970
|
p00008
|
C++
|
n;
int count = 0;
vector<int> result;
while(cin >> n){
for(int a = 0; a <= 9; a++)
for(int b = 0; b <= 9; b++)
for(int c = 0; c <= 9; c++)
for(int d = 0; d <= 9; d++)
if(a+b+c+d == n)
count++;
result.push_back(count);
count = 0;
}
for(const int& x : result){
cout << x << endl;
}
return 0;
}
|
a.cc:1:1: error: 'n' does not name a type
1 | n;
| ^
a.cc:4:9: error: 'vector' does not name a type
4 | vector<int> result;
| ^~~~~~
a.cc:5:9: error: expected unqualified-id before 'while'
5 | while(cin >> n){
| ^~~~~
a.cc:18:9: error: expected unqualified-id before 'for'
18 | for(const int& x : result){
| ^~~
a.cc:23:9: error: expected unqualified-id before 'return'
23 | return 0;
| ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
24 | }
| ^
|
s170971512
|
p00008
|
C++
|
#include<iostream>
#include<stdio.h>
int main(){
int a,b,c,d,n,i;
std::cin>>n;
i=0;
for(a=0;a<=9;a++){
for(b=0;b<=9;b++){
for(c=0;c<=9;c++){
for(d=0;d<=9;d++){
if(a+b+c+d==n){
i++;
}
}
}
}
std::cout<<i<<std::endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:24:10: error: expected '}' at end of input
24 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.