CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>
main_program{
	int x,y,a,b,c;

	cin>>x>>y;


	while(a<y && b<y && c<y){
	if{pow(a,2)+pow(b,2)=pow(c,2)}
		cout<<a<<b<<c;}
         
	else{(a++);}
	}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int x,y,flag=0;
	cin>>x>>y;
	int a;
	for(a=x+1;a<y;a++){
		int b;
		for(b=a+1;b<y;b++){
			float c;
			c=pow(a*a+b*b,0.5);
			int r;
			r=c;
			if(c>x && c<y && c/r==1){
				cout<<a<<" "<<b<<" "<<c<<endl;
				flag=1;
		}
		}
	}
	if(flag==0)
		cout<<"0"<<endl;
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>

main_program
{
	int start, end;
	cin >> start >> end;

	for(int a = start+2; a<=end; a++) {
		for(int b = start+1; b<a; b++) {
			for(int c = start; c<b; c++) {
				
				float fab, fac, fbc;
				int ta=a, tb=b, tc=c;

				while(true) {
					if (ta%tb==0) {
						fab = tb;
						ta = a; tb = b;
						break;
					}
					else {
						ta = tb;
						tb = ta%tb;
					}
				}

				while(true) {
                                        if (ta%tc==0) {
                                                fac = tc;
                                                ta = a; tc = c;
                                                break;
                                        }
                                        else {
                                                ta = tc;
                                                tb = ta%tc;
                                        }
                                }

				while(true) {
                                        if (tb%tc==0) {
                                                fbc = tc;
                                                tb = b; tc = c;
                                                break;
                                        }
                                        else {
                                                tb = tc;
                                                tc = tb%tc;
                                        }
                                }

				if (fab==1 && fac==1) {
					if (fbc == 1) {

					int a2 = a*a, b2 = b*b, c2 = c*c;
					int b2c2 = b2 + c2;
					if (a2 == b2c2) { cout << c << b << a << endl;}
					}
				}
			}
		}
	}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>
int main (){
	int n,m,a,b,c,k,p,q,r;
	if ((n>=1)&&(n<=pow(10,4))&&(m>=1)&&(m<=pow (10,4))){
		cin>>n>>m;
		c=n;

		while((a<m)&&(a>n)&&(c<m){
				
				int a=m;
				while(c<m){
				int b=n;
				while ((b<m)&&(b<a)){
				k=a%((b*b)+(c*c));
				b++;
			
				if (k==0){
				cout << a<< " "<< b<< " " << c<< endl }
				
				}
				a--;
				}
				c++;
	}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
int start,end,count=0;
cin>>start>>end;
 for(int i=start; i<=end; i++)
 {
    for(int j=i; j<=end; j++)
    {
         for(int k=i; k<=end; k++)
         {
           if( i*i + j*j == k*k ){    if((i%2==1 && j%2==1 )  || (i%2==1 && k%2==1 )  || (k%2==1 && j%2==1 ) ) { count++; cout<<i<<" "<<j<<" "<<k<<endl;}}
         }

    }



 }
if(count==0){cout<<"0";}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>

main_program
{
    int start, end;
    int a, b, c, i;
    int gcd = 1;
    bool flag = true;
    int k = 0;

    cin >> start >> end;
    
    for(a = start; a <= end; a++)
    {
        for(b = a; b <= end; b++)
        {
            for(c = b; c <= end; c++)
            {
                flag = true;
                for(i = 1; i <= a; i++)
                {
                    if((a % i == 0 && b % i == 0) || (a % i == 0 && c % i == 0) || (c % i == 0 && b % i == 0))
                    {
                        gcd = i;
                    }
                }
                if(gcd != 1)
                {
                    flag = false;
                }
                if(flag == true)
                {
                    if(a * a + b * b == c * c)
                    {   
                        cout << a << " " << b << " " << c << endl;
                        k = k + 1;
                    }
                }
                
            }
        }
    }
    if(k == 0)
    {
        cout << 0;
    }
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>

main_program
{
	int start,end,i,j,remainder,count = 0;
	cin>>start;
	cin>>end;
	for(i = start; i<end;i++)
	{
		for(j=i+1; j<end;j++)
		{
			int m = j, n = i;
			int gcd;
			if( m%n==0)
			{
				gcd = m;
			}
			else
			{
				while(m%n !=0)
				{
					remainder = m%n;
					m= n;
					n =remainder;
					if(m%n == 0)
					{
						gcd = n;
					}
				}
			}

				if(gcd == 1)
				{
				int root1 = sqrt(i*i + j*j);
				float root2 = sqrt(i*i + j*j);
				if(root1 == root2 && root1<=end)
				{
					cout<<i<<" "<<j<<" "<<root1<<endl;
					count++;
				}
				}
				
			
		}
		
	}
	if(count ==0)
	{
		cout<<"0";
	}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
int start,end,a,b,c;
cin>>start>>end;
a=start;
b=a+1;
c=a+2;
while(a<b)
{if(a*a+b*b==c*c){
cout<<a<<b<<c<<"\n";}
else{
 while(b<c) {
	 if(a*a+b*b==c*c){
         cout<<a<<b<<c<<"\n";}
         else{
          while(c<=end){
            if(a*a+b*b==c*c){
              cout<<a<<b<<c<<"\n";}
            else{
                c++;}}
         c=a+3;
         b++;}
}}
b=a+2;
a++;}}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	 int a,b,c,start,end;
	cin>>start,end;

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int x,y,a,b,c,p,q,r, i=0;
	cin >> x>>y;
	for(a=x;a<=y;a++){
		for(b=a;b<=y;b++){
			for(c=b;c<=y;c++){
				if(c== sqrt(a*a + b*b)){
					cout << a <<" " << b <<" " << c<< endl;
				}
					else{
						cout << i;
					}	       
				
			}
		}
	}

}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end,a,b,c,d=2;
	cin>>start>>end;
	a=start; b=start; c=start;
	while(a>=start && a<=end){
		b=a+1;
		while(b<=end){
			c=b+1;
			while(c<=end){
				if((a*a)+(b*b)==(c*c)) {
					while(d<end){
						if(a%d==0 && b%d==0 && c%d==0)
						{cout<<a<<" "<<b<<" "<<c<<"\n";} d++;}
				c++;}
			b++;}
		a++;}
	}}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end;
	cin>>start>>end;
	int a,b,c,i;
	a=start;
	b=start+1;
	c=start+2;
	while(a>=start){
	start=a;
	while(a<b){
		b=a+1;
		while(b<c){
			c=b+1;
			while(c<=end){
				if(c*c == a*a + b*b){
					cout<<a<<" "<<b<<" "<<c<<endl;
				}
				c=c+1;
			}
			b=b+1;
		}
		a=a+1;
	}
	a=a+1;
	}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
# include<simplecpp>
main_program{
    int start;
    int end;
    cin >> start;
    cin >> end;
    int a;
    int b;
    int c;
    int i;
    int j;
    int k;
    int v=0;

    
    for(i=start;i<=end-2;i++){
        a = i*i;
        for(j=start+1;j<=end-2;j++){
            b = j*j;
            for (k=(start+2);k<=(end-3);k++){
                c = k*k;

                if( (a + b) == c){

                    int q =i;
                    int r=j;
                    int s=k;

                    while(r%q!=0){
                        int rem =r%q;
                        r=q;
                        q=rem;
                    }
                    int z = q;
                    while (s%z!=0){
                        int rem = s%z;
                        s=z;
                        z=rem;
                    }
                    int g = z;
                    

                    if(((i/g)>=start) && (k/g)<=end){

                    cout << i/g <<" "<<j/g <<" "<<k/g<<endl;
                    v++;
                    }
                       
                }
            }
        }
    }
if(v==0){ 
cout << 0;}

}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program
{
	int start,end;
	cin>>start>>end;
	int i = start,t = 0;
	for(;i< end-1;i++)
	{
		int j = i+1;
		for(;j<end;j++)
		{
			int k = j+1;
			for(;k<end+1;k++)
			{
				if(i*i + j*j == k*k)
				{
			/*	while(b%a != 0)
				{
					b=a;
					a = b%a;
				}
				cout<<"yo";
				while(d%c != 0)
				{
					d = c;
					c = d%c;
				}
				cout<<"yo";
				while(f%e != 0)
				{
					f = e;
					e = f%e;
				}
				cout<<"yo";
				while(a == 1 && c == 1)
				{
					if(e == 1)
					{*/
						cout<<i<<" "<<j<<" "<<k<<endl;
						t++;
					
				
					
				
				}
				else
				{
					continue;
				}
			}
		}
	}
	if(t == 0)
	{
		cout<<"0";
	}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end ;
	cin>> start; cin>> end;
	int k = 0;
	int a = 0 ;
	int b = 0;
	for(int i = 1 ; i<=(end-start);i++){
		 a = (start*start) + (start + i)* (start +i);
		      k =i+ 1;
 b = (start + k )*(start + k) ;
if (b == a){
cout << start << ' ' << start + i <<' ' <<  start + k ;
}
k++;
if ( k == end - start + 1) {
	break;
	}
}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end,sq,r,m,n,rem1=1,rem2=2,rem3=3,a=0,b=0,c=0;
	bool y=true;
	float rt;
	cin >>  start >> end;
	for(int i=start;i<=end;i=i+1){
		for(int j=i;j<=end;j=j+1){
			sq=(i*i)+(j*j);
			rt=sqrt(sq);
			r=rt;
			if(((rt-r)==0) && rt<=end){
				m=rt;
				n=j;	
				while(rem1!=0){
					rem1=m%n;
					if(rem1!=0){
						m=n;
						n=rem1;}
					else{
						if(n==1){
						
						a=1;}
						else{
							y=false;}}}

			
				
				
				if(!y){break;}
				m=rt;
				n=i;
				y=true;
				while(rem2!=0){
                                        rem2=m%n;
                                        if(rem2!=0){
                                                m=n;
                                                n=rem2;}
                                        else{
                                                if(n==1){
                                                
						b=1;}
                                                else{
                                                        y=false;}}}


                             
     
               
				m=j;
				n=i;
				y=true;
                                while(rem3!=0){
                                        rem3=m%n;
                                        if(rem3!=0){
                                                m=n;
                                                n=rem3;}
                                        else{
                                                if(n==1){
                                                
						c=1;}
                                                else{
                                                        y=false;}}}


                                if(!y){break;}
				if(a==1 && b==1 && c==1){
				
				cout<< i  << " " << j <<  " " << rt << endl;}
		}
	}}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int a , b, d=0, c=0  , x=0;
	cin >> a;
	cin >> b;
	for(int i=a;i<=b;i++){
			for(int j=i;j<=b;j++){
				c=(i*i)+(j*j);
				for(int k=j;k<=b;k++){
					if((k*k)==c){
						x=0;
						for(int l=2;l<=b;l++){
							if((i%l==0)&&(j%l==0)&&(k%l==0)){
								x+=1;
							}
						}
						if(x==0){
							cout << i <<" " << j<<" " << k<<"\n";
							d+=1;
						}

					}
				}
			}
	
}
if(d==0){
	cout << "0";
}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>

main_program{

	int start, end , a , b, c;

	cin >> start >> end;
c = sqrt((a*a) + (b*b));
if( end - c> 0 && c-b > 0 && b-a > 0 && a- start> 0){
	cout << a << b << c;
}
return 0;

}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include <simplecpp>
main_program 
{
	int start,end,flag;
	flag = 0;
	cin >> start >> end;
	int a = start;
        int b = start;
	int c = start;
	for (a=start; a<=b; a++)
	{
		for (b=start; b<=c; b++)
		{
			for (c=start; c<=end; c++)
			{
				if ((a*a + b*b)==(c*c))
				{
				       int flagc = 0;	
					for (int i = 2; i<a ; i++)
					{
						if ((a%i==0)&&(b%i==0)&&(c%i==0))
						{
							flagc=1;
						}
					}
					if (flagc==0)
					{
						flag = 1;
						if ((a<b) && (b<c))
						{
						cout << a << " " << b << " " << c << "\n";
						}
					}
				}
			}
		}
	}
	if (flag==0)
	{
		cout << "0";
	}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end;
	cin>>start>>end;
	int count=0;
	for(int a=start;a<=end;a++)
	{
		for(int b=a+1;b<=end;b++)
		{
			int sum=a*a+b*b;
			int c=sqrt(sum);
			float x=sqrt(sum);
			if ((c==x)&&(c<=end)){
				bool valid=true;
				for(int i=2;i<=a;i++){
					if ((a%i==0)&&(b%i==0)&&(c%i==0)){
						valid=false;
					}
				
				}
				if (valid){
					cout<<a<<" "<<b<<" "<<c<<endl;
					count=count+1;
				}
			}
		}

	}
	if(count==0){
		cout<<"0";
	}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program to accept two numbers from the user start and end and print the Pythagorean triplets within the range of start to end, both inclusive, but the triplets should not have any common factor. If no such triplets exist, then print 0. The triplets should be in increasing order.

Student submission:
#include<simplecpp>
main_program{
	int start,end;
	cin>>start>>end;
	int a,b,c;
	a=start;
	b=a+1;
	c=a+2;
        while(a>=start && a<=end){
		while(b>=start && b<=end){
			while(c>=start && c<=end){
                                if(a>b && b>c && pow(a,2)==pow(b,2)+pow(c,2)){
			cout<<a<<" "<<b<<" "<<c<<endl;c++; break;}
	                 if(a>c && c>b && pow(a,2)==pow(c,2)+pow(b,2)){
				 cout<<b<<" "<<c<<" "<<a<<endl;c++; break;}
			 if(b>a && a>c && pow(b,2)==pow(a,2)+pow(c,2)){
				 cout<<c<<" "<<a<<" "<<b<<endl;c++; break;}
			 if(b>c && c>a && pow(b,2)==pow(c,2)+pow(a,2)){
				 cout<<a<<" "<<c<<" "<<b<<endl;c++; break;}
			 if(c>a && a>b && pow(c,2)==pow(a,2)+pow(b,2)){
				 cout<<b<<" "<<a<<" "<<c<<endl;c++; break;}
			 if(c>b && b>a && pow(c,2)==pow(b,2)+pow(a,2)){
				 cout<<a<<" "<<b<<" "<<c<<endl;c++; break;}
					}
			c=c-end+a+2;
		
			b++;}
		b=b-end+a+1;
	
	
		a++;}
}

Grading criterion: Placeholder for extra marks to be given for any reason
Rating A: Modularity, Extra Functions Defined, some corrective marks for failed testcases
Rating B: No reason for extra marks
Rating C: 0
Rating D: 0
Assigned grade: B