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 lcm(int a, int b){
	int d=b;
	while(d%a != 0 || d%b != 0)
	d++;
	
	return d;
}
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>
main_program{
	int a,b,t=1,p,q;
	cin>>a>>b;
	while(true){
		p = t%a;
		q = t%b;
		if (p==0&&q==0){
		       	cout<<t;
		       	break;
		}
		else t+=1;
	}
}

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 c,int d,int GCD)
{
int 	lcm=c*d/GCD;
return lcm;}
int gcd
(int a,int b)
{
while(a%b!=0)
{	int rem=a%b;
a=b;
b=rem;
}

return b;

}
main_program{
	int A,B;
	cin>>A>>B;
	int GCD=gcd( A, B);
	int lcm=LCM(A,B,GCD);
	cout<<endl<<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 LCM(int a, int b) {
	int remainder;
	int l;
	l = a*b;
	while ( b % a != 0){
		remainder = b % a;
		b = a;
		a = remainder;
	}
	int r;
	r = l / a;
	return r;
	
}
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 lcm (int m, int n){
	cin >> m >> n;
	int i;
	for(i=1; i>0; i++){
		while( i%m == 0 && i%n == 0){
			cout << i << endl;
			break;
		}
	}
	return i;
}

main_program{
	int A, B;
	cin >> A >> B;
	lcm(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 get_lcm(int m, int n)
{
	int a=m, b=n;
	while(a%b!=0)
	{
		int rem=a%b;
		a=b;
		b=rem;
	}
	int lcm=m*n/b;
	return lcm;
}

main_program
{
	int A,B;
	cin>>A>>B;
	cout<<get_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>
main_program{
	int A,B;
	cin >> A>>B;
	int LCM;
	LCM=60;
	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 m,int n) {

	int remainder;

	while(m%n!=0) {
		remainder = m%n;
		m = n;
		n = remainder;
	}
	return remainder;
}

main_program {

	int m,n;
	cin >> m >> n;
		

	cout<<(m*n)/gcd(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: 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 temp=m%n;
		m=n;
		n=temp;
	}
	return n;
}

main_program{
	int x,y,a,b;
	cin>>x>>y;
	if(x>y){
		a=x;
		b=y;
	}
	else{
		b=x;
		a=y;
	}
	int lcm=a*b/gcd(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: 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)     //creating function of gcd to compute gcd of two numbers
{
	while(n%m!=0)
	{
		int Remainder=n%m;
		n=m;
		m=Remainder;
	}
	return m;
}

float lcm(int m,int n)   //creating function of lcm to compute the lcm of two numbers
{
	float lcm=(m*n)/gcd(m,n);    //using the gcd function created above
	return lcm;
}

main_program
{
	int m,n;
	cin>>m>>n;       //taking input from user

	cout<<lcm(m,n)<<endl;      //prints the lcm of both numbers given by user
}

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 m,n,x,y,z;
	cin>>m>>n;
	x=n;
	y=m;
	while(m%n !=0) {
		z=n;
		n=m%n;
		m=z;
	}
	int l;
	l=(y*x)/n;
	cout<<l<<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 num1, num2;
	cin >> num1 >> num2;
	int LCM;
	for (int i = max(num1,num2); ;i++)
	{
		if((i%num1 == 0) && (i%num2 == 0))
		{
			LCM = i;
			break;
		}
	}
	
	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 a,int b){
                while(a%b!=0){
                        int remainder=a%b;
                        a=b;
                        b=remainder;}
                return(b);}
int lcm(int a,int b){
	return(a*b/gcd(a,b));}
main_program{
	int a,b;
	cin>>a>>b;
	if(a>b){int temp=a;a=b;b=temp;}
	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 a, int b){
	int remainder;
	if (a>b){
		while(a%b != 0){
			remainder =  a%b ;
			a = b ;
			b = remainder ;
		}
		return b ;
	}
	else{
		while(b%a != 0){
			remainder = b%a ;
			b = a ;
			a = remainder ;
		}
		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: 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;
cout<<"

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;
	for (a<=b){
        if (b-(a*b/a)=0)
		gcd=a;
	else if (a=b-(a*b/a)) && (b=a);
	gcd=a;
	}
	for (b>a){ (a=b) && (b=a)}
	cout<<(a*b)/gcd<<" "<<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;
	
       	if (A>B){
		 int i=A;
		 while(i%A!=0 || i%B!=0){ i++; }
		 cout <<i;
	 }
       
	if(B>A){
		 int i=B;
		 while(i%A!=0 || i%B!=0){i++;}
		 cout<<i;
	 }
	 if(B==A){cout<<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: 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, C, D, temp;
	cin >> A >> B;
	C=A;
	D=B;
	if(A>=B)
	{
	while(A%B!=0)
	{
		temp = A%B;
		A=B;
		B=temp;
	}
	cout << D*C/B ;
	}
	if (A<B)
	{
		while(B%A!=0)
		{
			temp = B%A;
			B=A;
			A = temp;
		}
		cout << C*D/A << 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,C;
	cin>>A>>B;
	C=2;
	repeat(A*B){
		if(C%A==0 && C%B==0) 
			cout<<" the LCM of A&B is :"<<C;
		else
			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: 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:
int lcm(int a, int b) {
	int remainder;
	int gcd;

		while(b%a!=0) {
			remainder = b%a;
			b=a;
		a=remainder;
		gcd = a;
		}
		
	int k = ((a*b)/(gcd));
	return k;
}
#include<simplecpp>
main_program{
	int p,q;
	cin >> p >> q;
	int result = lcm(p,q);
	cout << result;
}

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& A, int& B){
	int r;
	if (A>B){
		r= A % B;

		if(r!=0){
			
			A=B;
			B= r;
			
		}
		return B;
	}
	
	else{
		r= B % A;

		if(r!=0){
			
			B=A;
			A= r;
	

	}
		return A;
	}
}

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

	lcm =( A*B)/gcd(A,B);
	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 &m,int &n){
                int remainder;
                if(m%n==0)remainder=n;
                else{
                        m=n;
                        n=m%n;
                        remainder=n;
                }
             return remainder;
        }

int LCM(int &a,int &b){
	int p;
      	p=(a*b)/GCD(a,b);
	return p;
}

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

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 remainder;
	while(a%b!=0) {
		remainder = a%b;
		a=b;
		b/=remainder;
	}
	return b;
}
		

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: 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;
	cout<<function(a,b);
}
int function(int a,int b){

	int lcm;
	if(a>b){
		lcm=a;
	}
	else lcm=b;

	do
	{
		if((lcm%a==0)&&(lcm%b==0)){
		cout<<lcm;	
			break;
		}
		else
	      ++lcm;
	}while(true);

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 lcm(int a, int b){
	int x=a;
	int y=b;
	while(y%x!=0){
		int z=x;
	        x=y%x;
	        y=z;
	}
	int lcm;
	lcm=(a/x)*(b/x)*x;
	return lcm;
}
main_program{
	int A,B;
	cin>>A>>B;
	int lcmm;
	lcmm=lcm(A,B);
	cout<<lcmm;
}

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 r;
	while(a%b != 0){
		r = a%b;
		a = b;
		b = r;
	}
	return b;
}
int lcm(int m , int n){
	int ans = m*n/(gcd(m,n));
	return ans;
	}
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 LCM{
	int i=1;

while(i<a){
	if( a%i==0&&b%i==0)
	
	{z=a*b;
       LCM=a*b/i;
	       }
	
	i++;}
return lcm;

	
	
};
 main _program{
	 int a,b;
	 cin>>a>>b;
	 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
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 k = A;
	int j = B;
	int gcd;
	int ans;
	while(True){
		int n = A;
		int m = B;
		if(B/A>0){
			B = n;
			A = m%n;
		}

		if(A==0){
			gcd = B ;
		break;}
			
	}
	ans = j*k/gcd;
	return ans;
}

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 main(){
	int A,B;
	cout<<A<<B<<endl;
	int i=1;
	double result=1;
	if(A && B % i==0; A || B % i==0)
		i=i+1;
	result=i*(i+1)
}

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>

void LCM(int A, int B, int &ans){
		int remainder;
		int x=A, y=B;
		while(A%B!=0){
			remainder=A%B;
			A=B;
			B=remainder; }
		ans=(x*y)/B;
}

int main(){
	int a,b,c;
	cin>>a>>b;
	LCM(a,b,c);
	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 lcm(int a,int b){
	int p=a*b;
	int lcm;
	int gcd,temp;
	while(a%b!=0){
		temp=b;
		b=a%b;
		a=temp;
	}
	gcd=b;
	
	lcm=p/gcd;
	return lcm;
}

main_program{
	int a,b,ans;
	cin>>a>>b;
	if (b>a){
		ans=lcm(b,a);
	}
	else{
		ans=lcm(a,b);
	}
	cout<<ans<<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>
float GCD ( int A, int B ){
float C;
while( A % B !=0){
int Remainder= A%B ;
A=B ;
B =  Remainder;

}

return B;
}

float LCM ( int A , int B) {
int C = GCD(A,B) / (A*B);
return C;
}

main_program{
int 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<simp[lecpp>
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 n,a;
	int b=c=i=d=0;
	cin>>n;
	if (n>3){
		repeat(n){
			cin>>a;
			b=a;
		}
		c=b;
		i=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: 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 m, int n)
{
	int a=m, b=n;
	while(m%n!=0){
		int remainder;
		remainder=m%n;
		m=n;
		n=remainder;
	}
	int G=n;
	n=b;
	m=a;
	int L=(m*n)/G;
	return L;
}
int main(){
	int A, B;
	cin>>A>> B;
	LCM(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