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 a,int b) {
	while (a%b > 0) {
	int remainder = a%b;
	a=b;
	b= remainder;
	}
	return b;
}
int lcm(int a,int b) {
	int x = (a*b)/gcd(a,b);
	return x;
}
main_program {
	int a,b;
	cin >>a >>b;
	cout <<lcm(a,b) <<endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 product= a*b;
	int c =b;
	if(a<b){
		b=a;
		a=c;
	}

	while(a%b!=0){
		int r = a%b;
		a=b;
		b=r;
	}

	int hcf = b ;
	int x = product/hcf;

	return x;
}

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

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 remainder=n%m;
      
	      if(n%m !=0) {
		n=m;
	 
		m=remainder;
	     }
   
	return m;
	}
int lcm (int m , int n) {
int 	lcm_nu=(m*n)/gcd(m,n);
	return lcm_nu;
}
main_program {
	int A, B;
	cin>>A>>B;
	cout<<lcm(A,B);
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 Remainder;
	while (m%n !=0){
		Remainder = m %n;
		m =n;
		n = Remainder;
	}
	return n;
}
main_program{

	int A,B;
	cin >> A>> B;
	cout <<A*B/ gcd (A,B) << endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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>
main_program{
	int a,b;
	cin>>a>>b;

}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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>
main_program{
	int A,B;
	cin >>A>>B;
	int LCM(A,B);
	LCM(A,B) = A*B;
	int result;
	result = LCM(A,B);
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 i,c;	for(i=1; (a*i)%b!=0;i++){c=a*(i+1);}
	return c;
}
main_program{
	int A,B;
	cin>>A>>B;
	cout<<lcm(A,B)<<endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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;
	cin>>b;
	b>=a;
	int i;

	for( i<=a; a%i!=0; b%i!=0; i++)
	       int z;
	z=a*b;
	cout<<z;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 r = m % n;
		m=n;
		n=r;
	}
	return n;
    }
	int lcm(int m,int n);
	{
	return m*n/gcd(m,n);
        }
main_program
   {
	int m,n;
	cin>>m>>n;
	cout<<lcm(m,n)<<endl;
   }

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 hcf=1;
        for(int i=2;i<=a;i++)
        {
                if(a%i==0 && b%i==0)
                        hcf=i;

        }
        return (a*b)/hcf;

}

main_program
{
	int a,b;
	cin>>a>>b;
	if(b<a)
	{
		int temp=a;
		a=b;
		b=temp;
	}

	int c=lcm(a,b);
	cout<<c;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 main()
int A,B,r;
int	B>A
	int gcd(A,B);
	while(A%B=0)
	return B;
	while(A%B!=0)
int remainder=r;
A=B;
B=r
return r;


main_program{
int main()

int A,B;
int lcm=A*B/gcd(A,B)
cin>>A>>B;
cout<<lcm<<endl;

}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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){
	while (m%n!=0){
		int remainder=m%n;
		m=n;
		n=remainder;
	}
	return n;
}
int lcm(int m,int n){
	return m*n/gcd(m,n);
}
main_program{
	int a,b;
	cin>>a>>b;
	cout<<lcm(a,b)<<endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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;
}
int lcm
(int m, int n)
{ return (m*n)/gcd(m,n);
}
int main(){
	int A,B;
	cin>>A>>B;
	cout<<lcm(A,B)<<endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 p,q,x,y,i,j;
	cin>>x>>y;
while(x*i=y*j){
	int i=1;j=1;
	x*i=p;
	y*j=q;
	i++;
	j++;}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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){
	if(a%b==0){
		cout<<a;
	}
	else if(b%a==0){
		cout<<b;
	}
	else if(a%2==1 && b%2==1){
		cout<<a*b;
	}
	else if(a%2==0 && b%2==1 &&( a%b!=0 || b%a!=0)){
		cout<<((a*b)/abs(b-a));
	}
	else if(b%2==0 && a%2==1 &&( b%a!=0 || a%b!=0)){
		cout<<((a*b)/abs(b-a));
	}

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

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 (int A, int B){
	// we find hcfand do lcm = A*B/hcf
	int r, Atemp, Btemp;
	Atemp = A;
	Btemp = B;
	while (A % B > 0){
		r = A%B;
		A = B;
		B = r;
	}	
	return (Atemp * Btemp)/B;
}

main_program{
	int a, b;
	cin >> a >> b;
	if (a >= b) cout << lcm(a, b);
	else cout << lcm(b, a);
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 gcd ( int m, int n) {
	while ( m % n != 0) {
		int remainder;
		remainder = m % n;
		m = n;
		n = remainder;
	}
	return n;
} 
int lcm ( int m, int n) {
	int lcm = m*n /  gcd ( m , n) ;
	return lcm;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 c=a;
    a=max(a,b);
    if(a==b) b=c;
    else b=b;

    while(a%b!=0){
	    int remain=a%b;
	    a=b;
	    b=remain;
    }
    return b;


}

int LCM(int a,int b){
    int lcm=(a*b)/gcd(a,b);



return lcm;
}



main_program{
   int A,B;
   cin>>A>>B;

   cout<<LCM(A,B);  




}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 remainder;
	while(m%n!=0){
			remainder=m%n;
			m=n;
			n=remainder;
			}
			return n;
			}
			int lcm(int c,int d){
			int lcm=c*d/gcd(c,d);
			return lcm;}

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

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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;
gcd(int a,int b){
if (a%b==0)
   { a=b;
     b=a%b;}
     return  b;}
     int main () {
	     int m,n;
	     cin>>m>>n;
	     cout<<gcd(int m,int n)<<endl;}
	     lcm(a,b)*gcd(a,b)=a*b;

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 x = a;
	int y = b;
	while(a%b!=0){
		int remainder = a%b;
		a = b;
		b = remainder;
	}
	int l =x * y /b;
	return l;
}
main_program{
int a, b;
cin>>a>>b;
if (a>b) {cout<<LCM(a,b);}
else cout<<LCM(b,a);
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 (b);
}
int main(){
	int a,b;
	cin>>a>>b;
	cout<<(a*b)/lcm(a,b)<<endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 n1 = a, n2 = b, gcd = 0;
		while (a%b >0) {
			if (b-a >0)
			b = b-a;
			else b = a -b;
			gcd = b;
			
		}
		int answer  = (n1*n2)/gcd;
		return answer;
	}
 main_program {
	 int x1; cin >> x1;
	 int x2; cin >> x2;
	 cout << lcm (x1, x2);


 }

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 x1, int x2)
{
	int rem;
	int m = x2 , n = x1;
	while(x2 % x1 != 0)
	{
		rem = x2 % x1;
		x2 = x1;
		x1 = rem;
	}

	int ans= (m*n) / x1;
	return ans;
}
main_program
{
	int a,b;
	int an;
	cin>>a>>b;
	if(a>b)
	{
		 an = lcm(b,a);
	}

	else
	{
		an = lcm(a,b);
	}

	cout<<an;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 num1,int num2){
	int lim=min(num1,num2);
	int hcf;
	for(int i=1;i<=lim;++i){
		if(num1%i==0 && num2%i==0)
			hcf=i;
	}
	return (num1*num2)/hcf;
}
main_program{
	int num1,num2;
	cin>>num1>>num2;
	cout<<lcm(num1,num2)<<endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 remainder=0;
	int q=m;
	if (m%n == 0) cout<<m<<endl;
	else 
	while(m%n >0){
		remainder=m%n;
		m=n;
		n=remainder;
	}
        cout<<m*q/n<<endl;
        return 0;
}
int main(){
	int A,B;
	cin>>A>>B;
	lcm(A,B);
	return 0;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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){
	while(a%b!=0){
		int r=a%b;
	        a=b;
		b=r;
	}
	return b;
}
int lcm(int a , int b){
	return a*b/gcd(a,b);
}
main_program{ 
	int c,d;
	cin>>c>>d;
	cout<< lcm(c,d);
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 remainder = m%n;
		m=n;
		n=remainder;
	}
	return n;
}
int lcm(int m , int n ){
	return m*n/gcd(m,n);
}

int main(){
	int m,n;
	cin >> m >> n ;
	cout << lcm(m,n) << endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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;// b>a
		int m=b,n=a;
	while(m%n !=0)  {
		int remainder=m%n;
		m=n;
		n=remainder;
	}
	
	int lcm= (a*b)/n;
	cout<< lcm<<endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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>
main_program{
	int a,b,A,B,lcm;
	cin>> a>>b;
	A=a;
	B=b;
	
		while(b%a != 0){ 
			int rem;
		rem =b%a;
		b=a ;
		a=rem;
		}
		lcm=(A*B)/a;
		cout<<lcm;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 remainder;
		while(m%n !=0){
			remainder=m%n;
			m=n;
			n=remainder;
		}
		return n;
	}
int lcm(int n, int m){
	int k;
	k=(n*m)/gcd(n,m);
	return k;
}
main_program{
	int A,B;
	cin>>A>>B;
	cout<<lcm(A,B)<<endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 m,n,remainder;
	m=a; n=b;
	while(m%n!=0){
		remainder =m%n;
		m=n;
		n=remainder;
	}
	return a*b/n;
}
int main(){
	int x,y; cin>>x>>y;
	cout<< lcm(x,y) << endl;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 gcd;
	if(a%b==0){
		gcd=b;}
	lcm=((a*b)/gcd);
	return lcm;
	}
main_program{
	int m, n;
	cin>>m>>n;
	cout<<lcm(m,n)<<" ";
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
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 Remainder=a%b;
		a=b;
		b=Remainder;
	}
	int l=p/b;
	return l;
}
main_program{
	int x,y;
	cin>>x>>y;
	int LCM=lcm(x,y);
	cout<<LCM;
}

Grading criterion: is a seperate function for LCM is called?
Rating A: if a seperate function is written for LCM calculation
Rating B: if seperate function is not written or directly written in the main function
Rating C: 0
Rating D: 0
Assigned grade: A