CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int gcd(int m,int n){
	int rem;
	while(m%n !=0) {
	rem=m%n;
	m=n ;
	n=rem ;
	}
	return n ;
}
main_program {
	int a , b ;
	cin>>a>>b;
	cout<<(a*b)/gcd(a,b);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

 int LCM( int a,int b);
main_program
{
 int a, b;
 cin>>a>>b;
 cout<<LCM( a,b);
 }
 int LCM( int a,int b)
 {
 	int h=a;
 	int k=b ;
 int remainder;
 while( a%b!=0)
 {
  remainder = a%b;
  a=b;
  b=remainder;
  }
  return ( h*k/b);
  }

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int lcm(int a ,int b){
	while(a%b==0){
		return a;
	}
	while(b%a==0){
		return b;
	}
	int i,c;
	while  (a>=b){
		while(c%b!=0){
		c=a*i;
		i+=1;
		}
		return c;
	}
	while(a<=b){
		while(c%a!=0){
		c=b*i;
		i+=1;
		}
		return c;
	}
	
}
int main(){
	cout<<lcm(a,b);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
 int gcd(int m,int n){
	 int r;
             while (m%n>0){ r= m%n;
	      m=n;
	      n=r;
	     }return n;}
int lcm(int m,int n){int z;
	z=m*n/gcd(m,n);
	return z;}
	     main_program{int m,n;
		     cin>>m>>n;
		     cout<<lcm(m,n)<<endl;}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
main_program{

	int s , a, b;
	cin>>a >> b;
	
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
	int hc( int a, int b){
		int Remainder;
		int HCF;
		while(a!=b){
			remainder=b%a;	
			b=a;
			a=Remainder;
		}
		HCF=b;
		return HCF;
	}
int LCM(int a1, int b1){
	int lc=a1*b1/hc(a1,b1);
	return lc;
}
main_program{
	int m,n;
	cin>>m>>n;
	int ans=LCM(m,n);
	cout<<ans<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
int gcd(int m, int n){
	while(m%n !=0){
		m=n;
		n=m/n;
	}
	return n;
}
int lcm(int a, int b){
	int n= a*b/gcd(a,b);
	return n;
}
main_program{
	int x1,x2,X;
	cin>>x1>>x2;
	X=lcm(x1,x2);
	cout<<X<<endl; 
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int lcm(int a, int b)
{
	int i=1;
	while(true)
	{
		if(i%a==0 && i%b==0) break;
		i++;
	}
	return i;
}
int main()
{
	int x,y;
	cin>>x>>y;
	cout<<lcm(x,y);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
int gcd(int a, int b){
	int i;
	while(b%a!=0){
		i=b%a;
		b=a;
		a=i;
	}
	return a;
}
int lcm(int a, int b){
	return (a*b)/gcd(a,b);
}
main_program{
	int a, b;
	cin>>a>>b;
	cout<<lcm(a,b);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int gcd(int &a, int &b){
	int m;
	while (b>0){
		m=a%b;
		a=b;
		b=m;
	}
	return a;
}
int lcm(int &c, int &d){
	int n,res,c_temp,d_temp;
	c_temp=c;
	d_temp=d;
	n=gcd(c,d);
	res=(c_temp*d_temp)/n;
	return res;
}

main_program{
	int p,n1,n2,t;
	cin>>n1>>n2;
	t=n1;
	if (n1<n2){
		n1=n2;
		n2=t;
	}
	p=lcm(n1,n2);
	cout<<p;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

int lcm(int a, int b){
	int n=2,ans,q;
	q=b;
	while(a/n!=0 and b/n!=0){
		if(a%n==0 and b%n==0){
			a=a/n;
			b=b/n;
			n++;
		}
		else{
			n++;
			continue;
		}
	}

	

	ans = a*q;

	return ans;
}

main_program{
	int x,y;
	cin >> x >> y;
	cout << lcm(x,y);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

int A,B,lcm,gcd,z;
int lcmfunction(int A,int B){


cin>A,B;

z=A*B;

	while(A%B=0){
		
	A=B;
		B=A%B;
	gcd=B;
	};
		
	lcm=z/gcd;
}

main_program{

		cout<<lcmfunction(A,B);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int gcd(int n, int m)
{
	int rem;
	while (m%n != 0)
	{
		rem = m%n;
 		m = n;
		n = rem;
	}
	return n;
}	
int main()
{
	int n1, n2;
	cin >> n1 >> n2;
	int hcf = gcd(n1, n2);
	cout << (n1*n2)/hcf;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int lcm(int A, int B){
	while (A%B!=0){
	int remainder=A%B;
	A=B;
	B=remainder;
	}
	return (A*B)/B;
}
	
main_program{
	int A,B;
	cin>>A>>B;
	cout<<lcm(A,B);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
unsigned int lcm(unsigned int a,unsigned  int b)
{
	unsigned int l=a>b?a:b;
	while(!(l%a==0 && l%b==0))
	{
		l++;
	}
	return l;
}

main_program
{
	unsigned int n1,n2;
	cin>>n1>>n2;
	cout<< lcm(n1,n2);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

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

	int lcm ( int n, int m)
	{ 
		int rem, k;
		while ( rem !=0 )
		{
			k =n;
			rem = m%n;
	       		m =n;
			n=rem;
		}
	int x= a*b/k;
	return x;
	}

	cout << lcm (a,b);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int lcm( int a , int b ){
	int term = a*b;
       int remainder;
while (a%b!=0){
remainder = a%b;
a=b;
b= remainder;}
return term/b;}
main_program{
	int a , b;
	cin >> a >> b;
	cout<<lcm(a,b);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int LCMoftwoNumbers(int a,int b){
	int LCM,z,i=2;
	while (i<a){
        if (a%i==0&&b%i==0){
		z=a*b;
		LCM=z/i;
	       
	       z=LCM;
	}	
	i++;
         }
	return LCM;
}

main_program{
	int a,b;
	cin>>a;
	cin>>b;
	cout<<LCMoftwoNumbers(a,b)<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int lcm
(int a, int b){
	if(b>a){
		int temp;
		temp = a;
		a = b;
		b = temp;
	}
	int p =a*b;
	while(a%b != 0){
		int remain = a%b;
		a=b;
		b=remain;
	}
	int l =p/b;
	return l;

}
main_program{
	int x,y;
	cin >>x >>y;
	int LCM =lcm(x,y);
	cout << LCM;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>

main_program{
	int A, B;
	cin >> A >> B;
	int lcm = A;
	while(lcm % B != 0){
		lcm = lcm + A;
	}
	cout << lcm;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
nclude<simplecpp>
main_program
{
	int a,b;
	cin>>a>>b
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>

int GCD(int m, int n) {
  while(m%n != 0) 
     {int Remainder = m%n;
	     m=n;
	     n=Remainder;}
     return n;
}

int LCM(int a, int b) {
	return (a*b)/GCD(a,b);}
main_program {
	int x;
      	int y;

	cin >> x >> y;

	if(x>=y) {
	cout << LCM(x,y);}
	else {cout << LCM(y,x);}
     
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int gcd(int m,int n){	
        
 while(m%n!=0){
		int r=m%n;
		m=n;
		n=r;
		
}
return n;

}
       
       

       main_program{
	       int m;
	       int n;
	      
	       cin>>m>>n;
	      
	cout<<(m*n)/gcd(m,n) <<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
main_program{
	int m,n;
	cin>>m;
	cin>>n;
	while(m%n!=0){
		int remainder;
		remainder=m%n;
		m=n;
		n=remainder;
	}
	cout<<"lcm is :"<<m*n/remainder;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
main_program{
	int a, b, remainder = 1, hcf, prod;
	cin>>a>>b;
	prod = a*b;
	while(remainder != 0)
	{
		remainder = a%b;
		a = b;
		b = remainder;
	}
	hcf = a;
	cout<<prod/hcf<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int lcm(int n,int m)
{
	int a =n;
	int b=m;
	int remainder;
	while(n%m!=0)
	{
		remainder = n%m;
		n=m;
		m =remainder;
	}
	return((a*b)/m);
}
main_program
{
	int n,m;
	cin>>n>>m;
	if(n>m)
	cout<<lcm(n,m);
	else
		cout << lcm(m,n);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int lcm(int m, int n)
{
int x;
if(m>n)
x=n;
else
x=m;
int l;
int gcd;
for(int i=1; i<=x; i++)
{
if(m%i==0 && n%i==0)
gcd=i;
}
l= (m*n)/gcd;
return l;
}
main_program
{
int a,b;
cin>>a>>b;
cout<<lcm(a,b)<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
main_program{
	int a,b;
	cin>>a>>b;
	int i=1;
	while(i*a%b!=0){
		i++;
	}
	int n=i*a;
	cout<<n<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int n1,n2;
int func(int n1 , int n2)
if(n1>n2){
	n1=n1-n2;
}
if(n2>n1){n2=n2-n1;}
if(n1=n2) break;

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B