criyle/codenet-compile-errors huggingface dataset:
Language: Java


import java.util.*;

public class _0038 {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		
		while(stdIn.hasNext()){
			String str = stdIn.nextLine();
			int[] number = new int[5];
			int[] count = new int[14];
			int j = 0;
			for(int i=0;i<str.length();i++){
				if('0'<=str.charAt(i) && str.charAt(i)<='9'){
					number[j]=number[j]*10;
					number[j]+=(int)str.charAt(i)-(int)'0';
				}
				else{
					j++;
				}
			}
			
			Arrays.sort(number);
			j=0;
			int k=0;
			int count_x =0;
			while(k<number.length){
				if(number[k]==j){
					count[j]++;
					if(0<k){
						if(number[k]-number[k-1]==1){
							count_x++;
						}
						else{
							count_x=0;
						}
					}
					k++;
				}
				else{
					j++;
				}
			}
			int count_3 = 0;
			int count_2 = 0;
			for(int i=0;i<14;i++){
				if(count[i]==4){
					System.out.println("four card");
					break;
				}
				else if(count[i]==3){
					count_3++;
				}
				else if(count[i]==2){
					count_2++;
				}
				if(count_3==1&&count_2==1){
					System.out.println("full house");
					break;
				}
				else if(i==12){
					if(count_x == 4 || (count_x == 3 && number[0]==1)){
						System.out.println("straight");
						break;
					}
					else if(count_3==1){
						System.out.println("three card");
						break;
					}
					else if(count_2==2){
						System.out.println("two pair");
						break;
					}
					else if(count_2==1){
						System.out.println("one pair");
						break;
					}
					else{
						System.out.println("null");
						break;
					}
				}
			}
				
			
			
			
		}
	}
}

Compiler output:
Main.java:4: error: class _0038 is public, should be declared in a file named _0038.java
public class _0038 {
       ^
1 error
Language: Java

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;


public class Main{
	
	Map<Integer, Integer> number_of_cards;
	
	PokerHand(int... cards){
		this.number_of_cards = new HashMap<Integer, Integer>();
		for(int c = 1; c <= 13; c++) this.number_of_cards.put(c, 0);
		for(int i: cards) this.number_of_cards.put(i, this.number_of_cards.get(i) + 1);
	}
	
	Poker judge() {
		//onepair, twopair, threecard, fourcard, fullhouse
		int num_pair = 0;
		int num_three = 0;
		int num_four = 0;
		for(Map.Entry<Integer, Integer> e: this.number_of_cards.entrySet()) {
			if(e.getValue() == 2) num_pair++;
			else if(e.getValue() == 3) num_three++;
			else if(e.getValue() == 4) num_four++;
		}
		
		//straight
		boolean straight = false;
		out: for(int c = 1; c <= 9; c++) {
			for(int i = c; i < c+5; i++) {
				if(this.number_of_cards.get(i) != 1) continue out;
			}
			straight = true;
			break;
		}
		
		//straight 10 J Q K A
		out: if(this.number_of_cards.get(1) == 1) {
			for(int c = 10; c <= 13; c++) {
				if(this.number_of_cards.get(c) != 1) break out;
			}
			straight = true;
		}
		
		//judge
		if(num_four == 1) return Poker.FOURCARDS;
		else if(num_three == 1 && num_pair == 1) return Poker.FULLHOUSE;
		else if(straight) return Poker.STRAIGHT;
		else if(num_three == 1) return Poker.THREECARDS;
		else if(num_pair == 2) return Poker.TWOPAIR;
		else if(num_pair == 1) return Poker.ONEPAIR;
		else return Poker.NULL;
	}
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			Scanner scstr = new Scanner(line);
			scstr.useDelimiter(",");
			
			int[] cards = new int[5];
			for(int i = 0; i < cards.length; i++) {
				cards[i] = scstr.nextInt();
			}
			scstr.close();
			
			System.out.println(new PokerHand(cards).judge());
			scstr.close();
		}
		sc.close();
	}
	
}



enum Poker{
	NULL("null"), ONEPAIR("one pair"), TWOPAIR("two pair"), THREECARDS("three card"), 
	STRAIGHT("straight"), FULLHOUSE("full house"), FOURCARDS("four card");
	
	String name;
	
	public String toString() {
		return this.name;
	}
	
	Poker(String str) {
		this.name = str;
	}
}

Compiler output:
Main.java:10: error: invalid method declaration; return type required
	PokerHand(int... cards){
	^
1 error
Language: C

#include<stdio.h>

int main(){

   int a,b,c,d,e;
   int state = 0;      //0:null;1:1pair,2:2pair,3:3card,4:hullhouse,5:straight,6:4card

   while(scanf("%d,%d,%d,%d.%d",&a,&b,&c,&d,&e)!=EOF){

      while(!((a<=b)&&(b<=c)&&(c<=d)&&(d<=e))){
         int tmp;
         if(a>b){a = tmp; a = b; b = tmp;}
         if(b>c){b = tmp; b = c; c = tmp;}
         if(c>d){c = tmp; c = d; d = tmp;}
         if(d>e){d = tmp; d = e; e = tmp;}
      }

      int p1 = 0;
      int p1_n = 0;
      int p2 =0;
      int p2_n = 0;
      if(a==b){p1++; p1_n=a;}
      if(b==c){
         if(b == p1_n){
            p1++;
         }else if(p1_n==0){
            p1++;
            p1_n = b;
         }else{
            p2++;
            p2_n = b;
         }
      }
      if(c==d){
         if(c == p1_n){
            p1++;
         }else if(p1_n==0){
            p1++;
            p1_n = c;
         }else{
            p2++;
            p2_n = c;
         }
      }
      if(d==e){
      if(d == p1_n){
            p1++;
         }else if(p1_n==0){
            p1++;
            p1_n = d;
         }else{
            p2++;
            p2_n = d;
         }
      }
      

      state = 0;
      if(p1==0&&p2==0){
         if(a==1&&b ==10&&c==11&&d ==12&&e ==13){
            state =5;
         }else if(a+1==b&&b+1==c&&c+1 =d&&d+1 ==e){
            state =5;
         }
      }else if((p1==1&&p2==1)){
         state = 2;
      }else if((p1==1&&p2==2)||(p1==2&&p2==1)){
         state = 4;
      }else if(p1==3||p2==3){
         state = 6;
      }else if(p1==2||p2==2){
         state = 3;
      }else if(p1==1&&p2==1){
         state = 2;
      }else if(p1==1||p2==1){
         state =1;
      }
   

      swicth case(state){
         case 0:  printf("null\n"); break;
         case 1:  printf("one pair\n"); break;
         case 2:  printf("two pair\n"); break;
         case 3:  printf("three card\n"); break;
         case 4:  printf("hullhouse\n"); break;
         case 5:  printf("straight\n"); break;
         case 6:  printf("four card\n"); break;
      }
      
   

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:62:39: error: lvalue required as left operand of assignment
   62 |          }else if(a+1==b&&b+1==c&&c+1 =d&&d+1 ==e){
      |                                       ^
main.c:80:7: error: 'swicth' undeclared (first use in this function)
   80 |       swicth case(state){
      |       ^~~~~~
main.c:80:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:80:13: error: expected ';' before 'case'
   80 |       swicth case(state){
      |             ^~~~~
      |             ;
main.c:93:1: error: expected declaration or statement at end of input
   93 | }
      | ^
Language: C

#include<stdio.h>

int main(){
   int a[5],b[13];
   while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
      for(int i=0;i<13;i++)b[i]=0;
      for(int i=0;i<13;i++) b[a[i]-1]++;
      
      for(int i=0;i<13;i++){
         if(b[i]==4);
         printf("four card\n");
         goto exit;
      }

      for(int i=0;i<13;i++){
         for(int j=0; j<13;j++){
            if(b[i]==2&&b[j]==3){
               printf("full house\n");
               goto exit;
            }else if(b[i]==2&&b[j]==2){
               printf("two pair\n");
               go to exit;
            }
            
         }
      }


     for(int i=0;i<13;i++){
        if(b[i]==3){printf("three card\n");goto exit;}
        else if(b[i]==2){printf("two pair\n"); goto exit;}
     }

     for(int i=0;i<13-4;i++){
        if(b[i]==1&&b[i+1]==1&&b[i+2]==1&&b[i+3]==1&&b[i+4]==1){
           printf("straight\n");
           goto exit;
        }
     }

     if(b[0]==1&&b[9]==1&&b[10]==1&&b[11]==1&b[12]==1){printf("straight\n"); goto exit;}

     printf("null\n");

     exit;
      
     
   }
}

Compiler output:
main.c: In function 'main':
main.c:22:16: error: unknown type name 'go'
   22 |                go to exit;
      |                ^~
main.c:22:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'exit'
   22 |                go to exit;
      |                      ^~~~
main.c:45:6: error: 'exit' undeclared (first use in this function)
   45 |      exit;
      |      ^~~~
main.c:2:1: note: 'exit' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:45:6: note: each undeclared identifier is reported only once for each function it appears in
   45 |      exit;
      |      ^~~~
main.c:41:6: error: label 'exit' used but not defined
   41 |      if(b[0]==1&&b[9]==1&&b[10]==1&&b[11]==1&b[12]==1){printf("straight\n"); goto exit;}
      |      ^~
Language: C

#include<stdio.h>

int main(){
   int a[5],b[13];
   while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
      for(int i=0;i<13;i++)b[i]=0;
      for(int i=0;i<13;i++) b[a[i]-1]++;
      
      for(int i=0;i<13;i++){
         if(b[i]==4){
            printf("four card\n");
            goto exit;
         }
      }

      for(int i=0;i<13;i++){
         for(int j=0; j<13;j++){
            if(b[i]==2&&b[j]==3){
               printf("full house\n");
               goto exit;
            }else if(b[i]==2&&b[j]==2){
               printf("two pair\n");
               go to exit;
            }
            
         }
      }


     for(int i=0;i<13;i++){
        if(b[i]==3){printf("three card\n");goto exit;}
        else if(b[i]==2){printf("two pair\n"); goto exit;}
     }

     for(int i=0;i<13-4;i++){
        if(b[i]==1&&b[i+1]==1&&b[i+2]==1&&b[i+3]==1&&b[i+4]==1){
           printf("straight\n");
           goto exit;
        }
     }

     if(b[0]==1&&b[9]==1&&b[10]==1&&b[11]==1&b[12]==1){printf("straight\n"); goto exit;}

     printf("null\n");

     exit;
      
     
   }
}

Compiler output:
main.c: In function 'main':
main.c:23:16: error: unknown type name 'go'
   23 |                go to exit;
      |                ^~
main.c:23:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'exit'
   23 |                go to exit;
      |                      ^~~~
main.c:46:6: error: 'exit' undeclared (first use in this function)
   46 |      exit;
      |      ^~~~
main.c:2:1: note: 'exit' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:46:6: note: each undeclared identifier is reported only once for each function it appears in
   46 |      exit;
      |      ^~~~
main.c:42:6: error: label 'exit' used but not defined
   42 |      if(b[0]==1&&b[9]==1&&b[10]==1&&b[11]==1&b[12]==1){printf("straight\n"); goto exit;}
      |      ^~
Language: C

#include<stdio.h>

int main(){
   int a[5],b[13];
   while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
      for(int i=0;i<13;i++)b[i]=0;
      for(int i=0;i<13;i++) b[a[i]-1]++;
      
      for(int i=0;i<13;i++){
         if(b[i]==4){
            printf("four card\n");
            goto exit;
         }
      }

      for(int i=0;i<13;i++){
         for(int j=0; j<13;j++){
            if(b[i]==2&&b[j]==3){
               printf("full house\n");
               goto exit;
            }else if(b[i]==2&&b[j]==2){
               printf("two pair\n");
               goto exit;
            }
            
         }
      }


     for(int i=0;i<13;i++){
        if(b[i]==3){printf("three card\n");goto exit;}
        else if(b[i]==2){printf("two pair\n"); goto exit;}
     }

     for(int i=0;i<13-4;i++){
        if(b[i]==1&&b[i+1]==1&&b[i+2]==1&&b[i+3]==1&&b[i+4]==1){
           printf("straight\n");
           goto exit;
        }
     }

     if(b[0]==1&&b[9]==1&&b[10]==1&&b[11]==1&b[12]==1){printf("straight\n"); goto exit;}

     printf("null\n");

     exit;
      
     
   }
}

Compiler output:
main.c: In function 'main':
main.c:46:6: error: 'exit' undeclared (first use in this function)
   46 |      exit;
      |      ^~~~
main.c:2:1: note: 'exit' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:46:6: note: each undeclared identifier is reported only once for each function it appears in
   46 |      exit;
      |      ^~~~
main.c:42:6: error: label 'exit' used but not defined
   42 |      if(b[0]==1&&b[9]==1&&b[10]==1&&b[11]==1&b[12]==1){printf("straight\n"); goto exit;}
      |      ^~
Language: C

#include<stdio.h>

using namespace std;

int main(){
   int a[5],b[13];
   while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
      for(int i=0;i<13;i++){b[i]=0;}
      for(int i=0;i<5;i++){ b[a[i]-1]++;}
      
      for(int i=0;i<13;i++){
         if(b[i]==4){
            printf("four card\n");
            goto exit;
         }
      }

      for(int i=0;i<13;i++){
         for(int j=0; j<13;j++){
            if(b[i]==2&&b[j]==3){
               printf("full house\n");
               goto exit;
            }else if(b[i]==2&&b[j]==2){
               printf("two pair\n");
               goto exit;
            }
            
         }
      }


     for(int i=0;i<13;i++){
        if(b[i]==3){printf("three card\n");goto exit;}
        else if(b[i]==2){printf("two pair\n"); goto exit;}
     }

     for(int i=0;i<9;i++){
        if(b[i]==1&&b[i+1]==1&&b[i+2]==1&&b[i+3]==1&&b[i+4]==1){
           printf("straight\n");
           goto exit;
        }
     }

     if(b[0]==1&&b[9]==1&&b[10]==1&&b[11]==1&b[12]==1){printf("straight\n"); goto exit;}

     printf("null\n");

     exit:;
      
     
   }
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
Language: C

#include<stdio.h>

#define P 5

int main(void)
{
        int card[P] = {0, 0, 0, 0, 0};
        int i = 0;
        int j = 0;
        int k = 0;
        int m = 0;
        int count = 0;
        int t = 0;
        int c[P] = {0, 0, 0, 0, 0};

        while( scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4]) != EOF )
        {
                for(i = 0; i < P ; i++)
                {
                        for(j = 0; j < P ; j++)
                        {
                                if(card[i] > card[j])
                                {
                                        m = card[i];
                                        card[i] = card[j];
                                        card[j] = m;
                                }
                        }
                }
                for(i = 0; i < P ; i++)
                {
                        for(j = i + 1; j < P ; j++)
                        {
                                if(card[i] == card[j])
                                {
                                        count++;
                                }
                        }
                }

                if(count == 0)
                {
                        for(k = 0 ;k < P; k++)
                        {
                                c[k] = card[k] + k;
                        }
                        for(i = 1 ;i < P; i++)
                        {
                                if(c[0] == c[i])
                                {
                                        t++;
                                }
                        }
                        if((t == 4) || (card[0] == 13 && card[1] == 12 && card[2] == 11 && card[3] == 10 && card[4] == 1))
                        {
                                printf("straight\n");
                        }
                        else
                        {
                                printf("null\n");
                        }
                }
                else if(count == 1)
                {
                        printf("one pair\n");
                }
                else if(count == 2)
                {
                        printf("two pair\n");
                }
                else if(count == 3)
                {
                        printf("three card\n");
                }
                else if(count == 4)
                {
/bin/bash: indent: コマンドが見つかりません
                else if(count == 6)
                {
                        printf("four card\n");
                }
                t = 0;
                m = 0;
                count = 0;
                for(i = 0; i < P; i++)
                {
                           c[i] = 0;
                        card[i] = 0;
                }
                i = 0;
                j = 0;
                k = 0;
        }
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:77:1: error: expected expression before '/' token
   77 | /bin/bash: indent: コマンドが見つかりません
      | ^
main.c:95:1: error: expected declaration or statement at end of input
   95 | }
      | ^
Language: C

#include <stdio.h>
#include <stdlib.h>

int compare_int(const void *a, const void *b){
    return *(int*)a - *(int*)b;
}


int main(int argc,char* argv[]){
  int first_card,is_st;
  int i;
  int max,max2,max3,max4;
  int cards[5];
  int hands[13];
  
  while(scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],&cards[3],&cards[4]) != EOF){
    max = max2 = 0;is_st = 1;
    qsort(cards, 5, sizeof(int), compare_int);
    
    for(i = 0;i < 13;i++){
      hands[i] = 0;
    }
    
    for(i = 0;i < 5;i++){
      hands[cards[i] - 1]++;
    }

    for(i = 0;i < 13;i++){
      if(max <= hands[i]){
	max2 = ma;
	max = hands[i];
      }else if(max2 <= hands[i]){
	max2 = hands[i];
      }
    }
    
    if(max == 4){
      printf("four card\n");
      continue;
    }

    if(max == 3 && max2 == 2){
      printf("full house\n");
      continue;
    }
    
    first_card = cards[0];
    for(i = 1;i < 5;i++){
      if(first_card + 1 != cards[i]){is_st = 0;break;}else{
	first_card++;
      }
    }

    if(is_st || (cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13)){
      printf("straight\n");
      continue;
    }
    
    if(max == 3){
      printf("three card\n");
      continue;
    }

    if(max == 2 && max2 == 2){
      printf("two pair\n");
      continue;
    }

    if(max == 2){
      printf("one pair\n");
      continue;
    }

    printf("null\n");
    
  }
  
  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:30:16: error: 'ma' undeclared (first use in this function); did you mean 'max'?
   30 |         max2 = ma;
      |                ^~
      |                max
main.c:30:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <cstdio>
#include <functional>
#include <algorithm>

using namespace std;

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int d[ 5 ];
  int i;

  while ( scanf ( " %d,%d,%d,%d,%d"
                , d, d + 1, d + 2, d + 3, d + 4 ) == 5 )
  {
    int c[ 13 ] = { 0 };

    sort ( d, d + 5 );
    for ( i = 0; i < 5; ++i )
    {
      ++c[ d[ i ] - 1 ];
    }
    sort ( c, c + 13, greater< int > ( ) );

    if ( c[ 0 ] == 4 )
    {
      puts ( "four card" );
    }
    else if ( c[ 0 ] == 3 && c[ 1 ] == 2 )
    {
      puts ( "full house" );
    }
    else if ( ( d[ 0 ] == d[ 1 ] - 1
             && d[ 0 ] == d[ 2 ] - 2
             && d[ 0 ] == d[ 3 ] - 3
             && d[ 0 ] == d[ 4 ] - 4 )
           || ( d[ 0 ] == 1
             && d[ 1 ] == 10
             && d[ 2 ] == 11
             && d[ 3 ] == 12
             && d[ 4 ] == 13 ) )
    {
      puts ( "straight" );
    }
    else if ( c[ 0 ] == 3 )
    {
      puts ( "three card" );
    }
    else if ( c[ 0 ] == 2 && c[ 1 ] == 2 )
    {
      puts ( "two pair" );
    }
    else if ( c[ 0 ] == 2 )
    {
      puts ( "one pair" );
    }
    else
    {
      puts ( "null" );
    }
  }

  return ( 0 );
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void){
    int c[5];
    while(scanf("%d",&c[0])!=EOF){
        int i,j,work,count,flag;
        //↓昇順に並べ替える↓
        for(i=1;i<5;i++)scanf(",%d",&c[i]);
        for(i=0;i<4;i++){
            for(j=i+1;j<5;j++){
                if(c[i]>c[j]){
                    work=c[i];
                    c[i]=c[j];
                    c[j]=work;
                }
            }
        }
        //↓４カードの判定↓
        (c[0]==c[1])?i=0:i=1;
        count=0;
        for(j=1;j<4;j++){
            if(c[i]==c[i+j])count++;
        }
        if(count==3){
            puts("four card");
            continue;
        }
        //↓フルハウスの判定↓
        count=0;
        if(c[0]==c[1])count++;
        if(c[0]==c[2])count++;
        for(i=count+1;i<4;i++){
            if(c[i]==c[i+1])count++;
        }
        if(count==3){
            puts("full house");
            continue;
        }

        //↓ストレートの判定↓
        count=flag=0;
        if(c[0]==1 &&c[1]==10){
            flag=1;
            c[0]=9;
        }
        for(i=0;i<4;i++){
            if(c[i]==c[i+1]-1)count++;
        }
        if(count==4){
            puts("straight");
            continue;
        }
        if(flag==1)c[0]=1;
        //↓３カードの判定↓
        count=flag=0;
        for(i=0;i<4;i++){
            if(c[i]==c[i+1])count++;
            else count=0;
            if(count==2){
                puts("three card");
                flag=1;
            }
        }
        if(flag==1)continue;
        //↓２ペア or １ペア　or 豚の判定↓
        count=0;
        for(i=0;i<4;i++){
            if(c[i]==c[i+1])count++;
        }
        switch(count){
            case 2:puts("two pair");
                    break;
            case 1:puts("one pair");
                    break;
            default:puts("null");
        }





    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:27: error: lvalue required as left operand of assignment
   18 |         (c[0]==c[1])?i=0:i=1;
      |                           ^
Language: C

#include<stdio.h>
int main(void){
    int c[5];
    while(scanf("%d",&c[0])!=EOF){
        int i,j,work,count,flag;
        
        for(i=1;i<5;i++)scanf(",%d",&c[i]);
        for(i=0;i<4;i++){
            for(j=i+1;j<5;j++){
                if(c[i]>c[j]){
                    work=c[i];
                    c[i]=c[j];
                    c[j]=work;
                }
            }
        }
      
        (c[0]==c[1])?i=0:i=1;
        count=0;
        for(j=1;j<4;j++){
            if(c[i]==c[i+j])count++;
        }
        if(count==3){
            puts("four card");
            continue;
        }
        count=0;
        if(c[0]==c[1])count++;
        if(c[0]==c[2])count++;
        for(i=count+1;i<4;i++){
            if(c[i]==c[i+1])count++;
        }
        if(count==3){
            puts("full house");
            continue;
        }

        
        count=flag=0;
        if(c[0]==1 &&c[1]==10){
            flag=1;
            c[0]=9;
        }
        for(i=0;i<4;i++){
            if(c[i]==c[i+1]-1)count++;
        }
        if(count==4){
            puts("straight");
            continue;
        }
        if(flag==1)c[0]=1;
      
        count=flag=0;
        for(i=0;i<4;i++){
            if(c[i]==c[i+1])count++;
            else count=0;
            if(count==2){
                puts("three card");
                flag=1;
            }
        }
        if(flag==1)continue;
      
        count=0;
        for(i=0;i<4;i++){
            if(c[i]==c[i+1])count++;
        }
        switch(count){
            case 2:
                puts("two pair");
                break;
            case 1:
                puts("one pair");
                break;
            default:
                puts("null");
                break;
        }

    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:27: error: lvalue required as left operand of assignment
   18 |         (c[0]==c[1])?i=0:i=1;
      |                           ^
Language: C

#include<stdio.h>
int main(void){
    int c[5];
    while(scanf("%d",&c[0])!=EOF){
        int i,j,work,count,flag;
        
        for(i=1;i<5;i++)scanf(",%d",&c[i]);
        for(i=0;i<4;i++){
            for(j=i+1;j<5;j++){
                if(c[i]>c[j]){
                    work=c[i];
                    c[i]=c[j];
                    c[j]=work;
                }
            }
        }
      
        (c[0]==c[1])?i=0:i=1;
        count=0;
        for(j=1;j<4;j++){
            if(c[i]==c[i+j])count++;
        }
        if(count==3){
            puts("four card");
            continue;
        }
        count=0;
        if(c[0]==c[1])count++;
        if(c[0]==c[2])count++;
        for(i=count+1;i<4;i++){
            if(c[i]==c[i+1])count++;
        }
        if(count==3){
            puts("full house");
            continue;
        }

        
        count=0;
        flag=0;
        if(c[0]==1 &&c[1]==10){
            flag=1;
            c[0]=9;
        }
        for(i=0;i<4;i++){
            if(c[i]==c[i+1]-1)count++;
        }
        if(count==4){
            puts("straight");
            continue;
        }
        if(flag==1)c[0]=1;
      
        count=0;
        flag=0;
        for(i=0;i<4;i++){
            if(c[i]==c[i+1])count++;
            else count=0;
            if(count==2){
                puts("three card");
                flag=1;
            }
        }
        if(flag==1)continue;
      
        count=0;
        for(i=0;i<4;i++){
            if(c[i]==c[i+1])count++;
        }
        switch(count){
            case 2:
                puts("two pair");
                break;
            case 1:
                puts("one pair");
                break;
            default:
                puts("null");
                break;
        }

    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:27: error: lvalue required as left operand of assignment
   18 |         (c[0]==c[1])?i=0:i=1;
      |                           ^
Language: C

#include <cstdio>
#include <algorithm>

using namespace std;

int main(void)
{
	int hand[5];
	int i, j;
	
	while (scanf("%d", hand) != EOF){
		int straight = 1;
		int pair = 0;
		int three = 0;
		int four = 0;
		
		for (i = 1; i < 5; i++){
			scanf("%*c%d", hand + i);
		}
		sort(hand, hand + 5);
		for (i = 0; i < 5 || !puts(""); i++){
			printf("%d ", hand[i]);
		}
		for (i = 0; i < 4; i++){
			if (hand[i] == hand[i + 1]){
				pair++;
				i++;
			}
		}
		for (i = 0; i < 3; i++){
			if (hand[i] == hand[i + 1] && hand[i] == hand[i + 2]){
				three = 1;
				pair -= 2;
			}
		}
		for (i = 0; i < 2; i++){
			if (hand[i] == hand[i + 1] && hand[i] == hand[i + 2] && hand[i] == hand[i + 3]){
				four = 1;
			}
		}
		for (i = 0; i < 4; i++){
			if (hand[i] != hand[i + 1] - 1){
				straight = 0;
				break;
			}
		}
		if (hand[1] == 10 && hand[2] == 11 && hand[3] == 12 && hand[4] == 13 && hand[0] == 1){
			straight = 1;
		}
		if (straight == 1){
			puts("straight");
		}
		else if (four == 1){
			puts("four card");
		}
		else if (pair == 1 && three == 1){
			puts("full house");
		}
		else if (three == 1){
			puts("three card");
		}
		else if (pair == 2){
			puts("two pair");
		}
		else if (pair == 1){
			puts("one pair");
		}
		else {
			puts("null");
		}
		puts("");
	}
	
	return 0;
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C++

int main(){
    int tmp[5];
    char com;
    while(cin >>tmp[0]>>com>>tmp[1]>>com>>tmp[2]>>com>>tmp[3]>>com>>tmp[4]){
    int hand[15]={};

    for(int i=0; i<5; ++i){
      if(tmp[i]==1)++hand[13];
      ++hand[tmp[i]-1];
    }
   
    int pair=0,three=0,str=0,four=0;
    for(int i=1; i<15; ++i){
      if(hand[i]==4){++four;}
      if(hand[i]==1)++str;
      if(hand[i]==2)++pair;
      if(hand[i]==3)++three;
      if(str!=5 && hand[i]==0)str=0;
    }
    
    if(four)cout << "four card" << endl;
    else if(three && pair)cout << "full house" << endl;
    else if(str == 5)cout << "straight" << endl;
    else if(three)cout << "three card" << endl;
    else if(pair == 2)cout << "two pair" << endl;
    else if(pair == 1)cout << "one pair" << endl;
    else cout << "null" << endl;
  }
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope
    4 |     while(cin >>tmp[0]>>com>>tmp[1]>>com>>tmp[2]>>com>>tmp[3]>>com>>tmp[4]){
      |           ^~~
a.cc:21:13: error: 'cout' was not declared in this scope
   21 |     if(four)cout << "four card" << endl;
      |             ^~~~
a.cc:21:36: error: 'endl' was not declared in this scope
   21 |     if(four)cout << "four card" << endl;
      |                                    ^~~~
a.cc:22:27: error: 'cout' was not declared in this scope
   22 |     else if(three && pair)cout << "full house" << endl;
      |                           ^~~~
a.cc:22:51: error: 'endl' was not declared in this scope
   22 |     else if(three && pair)cout << "full house" << endl;
      |                                                   ^~~~
a.cc:23:22: error: 'cout' was not declared in this scope
   23 |     else if(str == 5)cout << "straight" << endl;
      |                      ^~~~
a.cc:23:44: error: 'endl' was not declared in this scope
   23 |     else if(str == 5)cout << "straight" << endl;
      |                                            ^~~~
a.cc:24:19: error: 'cout' was not declared in this scope
   24 |     else if(three)cout << "three card" << endl;
      |                   ^~~~
a.cc:24:43: error: 'endl' was not declared in this scope
   24 |     else if(three)cout << "three card" << endl;
      |                                           ^~~~
a.cc:25:23: error: 'cout' was not declared in this scope
   25 |     else if(pair == 2)cout << "two pair" << endl;
      |                       ^~~~
a.cc:25:45: error: 'endl' was not declared in this scope
   25 |     else if(pair == 2)cout << "two pair" << endl;
      |                                             ^~~~
a.cc:26:23: error: 'cout' was not declared in this scope
   26 |     else if(pair == 1)cout << "one pair" << endl;
      |                       ^~~~
a.cc:26:45: error: 'endl' was not declared in this scope
   26 |     else if(pair == 1)cout << "one pair" << endl;
      |                                             ^~~~
a.cc:27:10: error: 'cout' was not declared in this scope
   27 |     else cout << "null" << endl;
      |          ^~~~
a.cc:27:28: error: 'endl' was not declared in this scope
   27 |     else cout << "null" << endl;
      |                            ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
  vector<int> poker;
  int check[15] = {0};
  int two = 0; int three = 0; int four = 0;
  int ans = 0;

  string trump;
  getline(cin,trump));

  int a = 0;
  int b = 0;

  for(char e : trump){
    if(e == 49){
      if(b == 0){
        b = 1;
      }
      else{
        a = (e - 48) + 10;
        poker.push_back(a);
        b = 0;
      }
    }
    else if(48 <= e && 57 >= e && e != 49){
      if(b == 1){
        a = (e - 48) + 10;
        b = 0;
      }
      else{
        a = e - 48;
      }
      poker.push_back(a);
    }
    else{
      if(b == 1){
        poker.push_back(b);
        b = 0;
      }
    }
  }
  
  if(b == 1){
    poker.push_back(b);
  }

  for(int e : poker){
    ++check[e];
  }

  check[14] = check[1];

  for(int i = 1;i < 14;++i){
    if(check[i] == 4){
      ++four;
    }
    else if(check[i] == 3){
      ++three;
    }
    else if(check[i] == 2){
      ++two;
    }
  }

  if(four == 1){
    cout<<"four card"<<endl;
    ans = 1;
  }
  else if(three == 1){
    ans = 1;
    if(two == 1){
      cout<<"full house"<<endl;
    }
    else{
      cout<<"three card"<<endl;
    }
  }
  else if(two == 2){
    ans = 1;
    cout<<"two pair"<<endl;
  }
  else if(two == 1){
    ans = 1;
    cout<<"one pair"<<endl;
  }
  else{
    for(int i = 1;i < 11;++i){
      if(check[i] == check[i+1] && check[i] == check[i+2] && check[i] == check[i+3] && check[i] == check[i+4] && check[i] != 0){
        cout<<"straight"<<endl;
        ans = 1;
        break;
      }
    }
  }

  if(ans == 0){
    cout<<"null"<<endl;
  }
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: expected ';' before ')' token
   13 |   getline(cin,trump));
      |                     ^
      |                     ;
a.cc: At global scope:
a.cc:105:3: error: expected unqualified-id before 'return'
  105 |   return 0;
      |   ^~~~~~
a.cc:106:1: error: expected declaration before '}' token
  106 | }
      | ^
Language: C++

#include <stdio.h>
#include <algorithm.h>

using namespace std;

int main(void)
{
	int card[5];
	int count1;
	int count2;
	int straight;
	int i;
	int j;
	char conma;
	
	while (scanf("%d", &card[0]) != EOF){
		for (i = 1; i < 5; i++){
			scanf("%c %d", &conma, &card[i]);
		}
		sort(card, card + 5);
		count1 = 0;
		count2 = 0;
		straight = 0;
		
		for (i = 0; i < 4; i++){
			if (card[i] + 1 == card[i + 1]){
				straight++;
			}
			if (card[i] == card[i + 1] && card[i] == card[0]){
				count1++;
			}
			else if (card[i]  == card[i + 1] && card[i] != card[0]){
				count2++;
			}
		}
		
		if ((count1 == 1 && count2 == 0) || (count1 == 0 && count2 == 1)){
			printf("one pair\n");
		}
		else if (count1 == 1 && count1 == count2){
			printf("two pair\n");
		}
		else if (count1 + count2 == 3 && count1 != 0 && count2 != 0){
			printf("full house\n");
		}
			
		else if (count1 == 2 || count2 == 2){
			printf("three card\n");
		}
		else if (straight == 4){
			printf("straight\n");
		}
		else if (card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13){
			printf("straight\n");
		}
		else if (count1 == 3 || count2 == 3){
			printf("four card\n");
		}
		else {
			printf("null\n");
		}
	}
	
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: algorithm.h: No such file or directory
    2 | #include <algorithm.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
#include <algorithm.h>

using namespace std;

int main(void)
{
	int card[5];
	int count1;
	int count2;
	int straight;
	int i;
	int j;
	char conma;
	
	while (scanf("%d", &card[0]) != EOF){
		for (i = 1; i < 5; i++){
			scanf("%c %d", &conma, &card[i]);
		}
		sort(card, card + 5);
		
		count1 = 0;
		count2 = 0;
		straight = 0;
		
		for (i = 0; i < 4; i++){
			if (card[i] + 1 == card[i + 1]){
				straight++;
			}
			if (card[i] == card[i + 1] && card[i] == card[0]){
				count1++;
			}
			else if (card[i]  == card[i + 1] && card[i] != card[0]){
				count2++;
			}
		}
		
		if ((count1 == 1 && count2 == 0) || (count1 == 0 && count2 == 1)){
			printf("one pair\n");
		}
		else if (count1 == 1 && count1 == count2){
			printf("two pair\n");
		}
		else if (count1 + count2 == 3 && count1 != 0 && count2 != 0){
			printf("full house\n");
		}
			
		else if (count1 == 2 || count2 == 2){
			printf("three card\n");
		}
		else if (straight == 4){
			printf("straight\n");
		}
		else if (card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13){
			printf("straight\n");
		}
		else if (count1 == 3 || count2 == 3){
			printf("four card\n");
		}
		else {
			printf("null\n");
		}
	}
	
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: algorithm.h: No such file or directory
    2 | #include <algorithm.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
#include <algorithm.h>

using namespace std;

int main(void)
{
	int card[5];
	int c1;
	int c2;
	int straight;
	int i;
	int j;
	char conma;
	
	while (scanf("%d", &card[0]) != EOF){
		for (i = 1; i < 5; i++){
			scanf("%c %d", &conma, &card[i]);
		}
		sort(card, card + 5);
		
		c1 = 0;
		c2 = 0;
		straight = 0;
		
		for (i = 0; i < 4; i++){
			if (card[i] + 1 == card[i + 1]){
				straight++;
			}
			if (card[i] == card[i + 1] && card[i] == card[0]){
				c1++;
			}
			else if (card[i]  == card[i + 1] && card[i] != card[0]){
				c2++;
			}
		}
		
		if ((c1 == 1 && c2 == 0) || (c1 == 0 && c2 == 1)){
			printf("one pair\n");
		}
		else if (c1 == 1 && c1 == c2){
			printf("two pair\n");
		}
		else if (c1 + c2 == 3 && c1 != 0 && c2 != 0){
			printf("full house\n");
		}
			
		else if (c1 == 2 || c2 == 2){
			printf("three card\n");
		}
		else if (straight == 4){
			printf("straight\n");
		}
		else if (card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13){
			printf("straight\n");
		}
		else if (c1 == 3 || c2 == 3){
			printf("four card\n");
		}
		else {
			printf("null\n");
		}
	}
	
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: algorithm.h: No such file or directory
    2 | #include <algorithm.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
#include <stdcomp.h>
#include <algorithm.h>

using namespace std;

int main(void)
{
	int card[5];
	int count1;
	int count2;
	int straight;
	int i;
	int j;
	char conma;
	
	while (scanf("%d", &card[0]) != EOF){
		for (i = 1; i < 5; i++){
			scanf("%c %d", &conma, &card[i]);
		}
		sort(card, card + 5);
		count1 = 0;
		count2 = 0;
		straight = 0
		
		for (i = 0; i < 4; i++){
			if (card[i] + 1 == card[i + 1]){
				straight++;
			}
			if (card[i] == card[i + 1] && card[i] == card[0]){
				count1++;
			}
			else if (card[i]  == card[i + 1] && card[i] != card[0]){
				count2++;
			}
		}
		
		if ((count1 == 1 && count2 == 0) || (count1 == 0 && count2 == 1)){
			printf("one pair\n");
		}
		else if (count1 == 1 && count1 == count2){
			printf("two pair\n");
		}
		else if (count1 == 2 || count2 == 2){
			printf("three card\n");
		}
		else if (straight == 4){
			printf("straight\n");
		}
		else if (count1 == 3 || count2 == 3){
			printf("four card\n");
		}
		else {
			printf("null\n");
		}
	}
	
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: stdcomp.h: No such file or directory
    2 | #include <stdcomp.h>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;

int main(){
int n[6];
int c=0,cc=0;
bool f=true;
while(scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF){
for(int i=0;i<5;i++)
for(int j=4;j>i;j--)
if(n[j-1]>n[j]){int t=n[j];n[j]=n[j-1];n[j-1]=t;}

for(int i=0;i<4;i++){
if(n[i]==n[i+1])c++;
else if(c>=1){cc=c;c=0;}
else {c=0;cc=0;}
}

for(int i=0;i<3;i++){
if(n[i+1]!=(n[i]+1)f=false;
}
if(n[0]==1&&n[1]==10&&n[2]==11&&n[3]==12&&n[4]==13)f=true;





if(c==3)printf("four card\n");
else if(c==2&&cc=1)printf("full house\n");
else if(f==true)printf("straight\n");
else if(c==2)printf("three card\n");
else if(n[0]==n[1]&&n[2]==n[3])printf("two pair\n");
else if(n[0]==n[1]&&n[3]==n[4])printf("two pair\n");
else if(n[1]==n[2]&&n[3]==n[4])printf("two pair\n");
else if(n[0]==n[1]||n[2]==n[3]||n[1]==n[2]||n[3]==n[4])printf("one pair\n");

c=0,cc=0;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: expected ';' before 'f'
   21 | if(n[i+1]!=(n[i]+1)f=false;
      |                    ^
      |                    ;
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
a.cc:21:28: error: expected ')' before '}' token
   21 | if(n[i+1]!=(n[i]+1)f=false;
      |   ~                        ^
      |                            )
   22 | }
      | ~                           
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
a.cc:30:13: error: lvalue required as left operand of assignment
   30 | else if(c==2&&cc=1)printf("full house\n");
      |         ~~~~^~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;

int main(){
    int a[5];
    char c;
    while(cin>>a[0]>>c>>a[1]>>c>>a[2]>>c>>a[3]>>c>>a[4]){
        sort(a,a+5);
        int c[5],j=0;
        memset(c,0,sizeof(c));
        for(int i=0;i<4;i++){
            if(a[i+1]!=a[i])
                j++;
            if(a[i+1]==a[i]){
                c[j]++;
            }
        }
        int p=0,t=0,f=0;
        for(int i=0;i<5;i++){
            if(c[i]==1)p++;
            if(c[i]==2)t++;
            if(c[i]==3)f++;
        }
        if(p==2){
            cout<<"two pair"<<endl;
        }
        else if(p==1&&t==1)
            cout<<"full house"<<endl;
        else if(t==1)
            cout<<"three card"<<endl;
        else if(f==1)
            cout<<"four card"<<endl;
        else if(p==1){
            cout<<"one pair"<<endl;
        }
        else if((a[3]==a[4]-1)&&(a[1]==a[2]-1)&&(a[2]==a[3]-1)&&((a[0]==a[1]-1)||(a[4]==13&&a[0]==1)))
            cout<<"straight"<<endl;
        else cout<<"null"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |         sort(a,a+5);
      |         ^~~~
      |         short
a.cc:12:9: error: 'memset' was not declared in this scope
   12 |         memset(c,0,sizeof(c));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<vector>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<string.h>
using namespace std;

int main(){
    int a[5];
    char c;
    while(cin>>a[0]>>c>>a[1]>>c>>a[2]>>c>>a[3]>>c>>a[4]){
        sort(a,a+5);
        int c[5],j=0;
        memset(c,0,sizeof(c));
        for(int i=0;i<4;i++){
            if(a[i+1]!=a[i])
                j++;
            if(a[i+1]==a[i]){
                c[j]++;
            }
        }
        int p=0,t=0,f=0;
        for(int i=0;i<5;i++){
            if(c[i]==1)p++;
            if(c[i]==2)t++;
            if(c[i]==3)f++;
        }
        if(p==2){
            cout<<"two pair"<<endl;
        }
        else if(p==1&&t==1)
            cout<<"full house"<<endl;
        else if(t==1)
            cout<<"three card"<<endl;
        else if(f==1)
            cout<<"four card"<<endl;
        else if(p==1){
            cout<<"one pair"<<endl;
        }
        else if((a[3]==a[4]-1)&&(a[1]==a[2]-1)&&(a[2]==a[3]-1)&&((a[0]==a[1]-1)||(a[4]==13&&a[0]==1)))
            cout<<"straight"<<endl;
        else cout<<"null"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(a,a+5);
      |         ^~~~
      |         short
Language: C++

import sys

def is_onepair(x):
    for i in range(4):
        if x.count(x[i]) == 2:
            return True

    return False

def is_twopair(x):
    count = 0
    for e in x:
        for e2 in x:
            if e == e2:
                count += 1
            if count == 2:
                return True

    return False

def is_threecard(x):
    for i in range(3):
        if x.count(x[i]) == 3:
            return True

    return False

def is_straight(x):
    x.sort()
    if x[0] == 1 and x[1:] = [10, 11, 12, 13]:
        return True
    for i in range(4):
        if x[i]+1 != x[i+1]:
            return False
    
    return True

def is_fullhouse(x):
    if is_threecard(x) and is_onepair(x):
        return True

    return False
    
def is_fourcard(x):
    for i in range(2):
        if x.count(x[i]) == 4:
            return True

    return False

for line in sys.stdin.readlines():
    hand = list(map(int, line.split(',')))
    if is_fourcard(hand):
        print("four card")
    elif is_fullhouse(hand):
        print("full house")
    elif is_straight(hand):
        print("straight")
    elif is_threecard(hand):
        print("three card")
    elif is_twopair(hand):
        print("two pair")
    elif is_onepair(hand):
        print("one pair")
    else:
        print("null")

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;

int main(){
	int n[5], num[14], pair[3],i;
	while (scanf_s("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4]) != EOF){
		i = 0;
		for (int i = 0; i < 14; i++) num[i] = 0;
		for (int i = 0; i < 3; i++) pair[i] = 0;
		for (int i = 0; i < 5; i++) num[n[i] - 1]++;
		for (int i = 0; i < 13; i++){
			if (num[i] > 1) pair[num[i] - 2]++;
		}
		if (pair[2]) cout << "four card" << endl;
		else if (pair[0] && pair[1]) cout << "full house" << endl;
		else if (pair[1]) cout << "three card" << endl;
		else if (pair[0] == 2) cout << "two pair" << endl;
		else if (pair[0]) cout << "one pair" << endl;
		else{
			num[13] = num[0];
			for (i = 0; i < 10; i++){
				if (num[i] == 1 && num[i] == num[i + 1] && num[i + 1] == num[i + 2] && num[i + 2] == num[i + 3] && num[i + 3] == num[i + 4]) {
					cout << "straight" << endl;
					break;
				}
			}
		}
		if (i == 10)  cout << "null" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |         while (scanf_s("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4]) != EOF){
      |                ^~~~~~~
      |                scanf
Language: C++

def function(a,b,c,d,e):
	A=[a,b,c,d,e]
	A.sort()
	if A[0]==A[3] or A[1]==A[4]:
		print("four card")
	elif (A[0]==A[1] and A[2]==A[4]) or (A[0]==A[2] and A[3]==A[4]):
		print("full house")
	elif A[0]==A[2] or A[1]==A[3] or A[2]==A[4]:
		print("three card")

	elif (A[0]==A[1] and A[2]==A[3]) or (A[0]==A[1] and A[3]==A[4]) or (A[1]==A[2] and A[3]==A[4]):
		print("two pair")
	elif A[0]==A[1] or A[1]==A[2] or A[2]==A[3] or A[3]==A[4]:
		print("one pair")
	elif A==[1,10,11,12,13]:
		print("straight")
	elif A[0]==A[1]-1==A[2]-2==A[3]-3==A[4]-4:
		print("straight")
	else:
		print("null")

while True:
	try:
		a,b,c,d,e=map(int,input().split(','))
		function(a,b,c,d,e)
	except EOFError:
		break

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def function(a,b,c,d,e):
      | ^~~
Language: C++

# -*- coding: utf-8 -*-


def is_four_card(d):
    return 4 in d.values()


def is_full_house(d):
    return 3 in d.values() and 2 in d.values()


def is_straight(d):
    flag = [False, 0]
    for i in d.values():
        if flag[0] == True and flag[1] == 5:
            return True

        if i == 1:
            flag[0] = True
            flag[1] += 1
    return False


def is_three_card(d):
    return 3 in d.values()


def is_two_pair(d):
    return list(d.values()).count(2) == 2


def is_one_pair(d):
    return list(d.values()).count(2) == 1


def judge(d):
    if is_four_card(d):
        print('four card')
    elif is_full_house(d):
        print('full house')
    elif is_straight(d):
        print('straight')
    elif is_three_card(d):
        print('three card')
    elif is_two_pair(d):
        print('two pair')
    elif is_one_pair(d):
        print('one pair')
    else:
        print('null')


def solve(cards):
    d = {k: 0 for k in range(1, 14)}
    for card in cards:
        d[card] += 1
    judge(d)

_input = input().split(",")
solve(_input)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:38:15: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
   38 |         print('four card')
      |               ^~~~~~~~~~~
a.cc:40:15: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   40 |         print('full house')
      |               ^~~~~~~~~~~~
a.cc:42:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   42 |         print('straight')
      |               ^~~~~~~~~~
a.cc:44:15: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   44 |         print('three card')
      |               ^~~~~~~~~~~~
a.cc:46:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   46 |         print('two pair')
      |               ^~~~~~~~~~
a.cc:48:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   48 |         print('one pair')
      |               ^~~~~~~~~~
a.cc:50:15: warning: multi-character character constant [-Wmultichar]
   50 |         print('null')
      |               ^~~~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def is_four_card(d):
      | ^~~
a.cc:55:5: error: expected unqualified-id before 'for'
   55 |     for card in cards:
      |     ^~~