CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include<simplecpp>
main_program {
    int m , n ;
    cin >> m >> n ;
    int sum = m+n ;
    int a = sum%1000 , b , number ;
    b= (sum-a)/1000 ;
    if ( b==1 || b==3 || b==4 ) {
        number = sum + 21590000 ;
        cout << number ;
    }
    else if ( b==5 || b==7 || b==8 ) {
         number = sum + 25760000  ;
         cout << number ;
    }
    else if ( b==0 || b==2 || b==6 || b==9 ) {
        cout << "invalid" ;
    }
}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include<simplecpp>
main_program{
    int m, n;
    cin >> m >> n;
    int sum = m+n;
    int digit = sum/1000;
    if(digit == 0 || digit == 2 || digit == 6 || digit == 9)
     cout << "invalid";
     else if(digit == 1 || digit == 3 || digit == 4)
     cout << "2159" << sum;
     else if(digit == 5 || digit == 7 || digit == 8)
     cout << "2576" << sum;
}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
# include <simplecpp>
main_program{
        int  a , b, num ;
        cin >> a >> b;
        if ( (a + b) < 10000){
               num = a + b ;

        }
        int digit = num/1000;
        if ( digit == 1 || digit == 3 || digit == 4){
                cout << 2159 << num << endl;
        }
        else if ( digit == 5 || digit == 7 || digit == 8){
                cout << 2576 << num << endl;
        }
        else
                cout << "invalid";
}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include<simplecpp>
int main(){
    int m,n,p;
    cin >> m >> n;
    p=m+n;
    if(p<=9999 && p>=0){
        if(p/1000==1 || p/1000==3 || p/1000==4){
            int x;
            x=21590000+p;
            cout << x;
        }
        else{
            if(p/1000==5 || p/1000==7 || p/1000==8){
                int y;
                y=25760000+p;
                cout << y; 
            }
            else{
                cout << "invalid";
            }
        }
    }
}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include<simplecpp>
main_program
{
    int 0<=m<=9999,0<=n<=9999,0<=digit<=9999,i,j,k;
    cin>> m;
    cin>> n;
    digit=m+n;
    for(j=1;p>0;j++){
        p=digit/10;
        if(j<=4) for(k=1;k+j=5,k++){
            digit=digit*10}
        }
    
    for(i=1;i<=3;i++){
        digit=m/10;}
        if(digit==0|| digit==2|| digit==6 || digit==9)
         {cout<<"invalid"<<endl;}
         else if(digit==1|| digit==3|| digit==4){}
         cout<< " "<<digit+(2159*10000)<<endl ;}
         else cout<<" "<<digit+(2576*10000)<<endl; 
         }

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include <simplecpp>
main_program {
        int m,n;
        cin >> m >> n;
        int a=m+n;
        if (((1000<=a)&&(a<1999))||((3000<=a)&&(a<3999))||((4000<=a)&&(a<4999))) {
                cout << 2159 << a;
        }
        else if (((5000<=a)&&(a<5999))||((7000<=a)&&(a<7999))||((8000<=a)&&(a<8999))) {
                cout << 2576 << a;
        }
        else if (((0<=a)&&(a<999))||((2000<=a)&&(a<2999))||((6000<=a)&(a<6999))||((9000<=a)&&(a<9999))) {
                cout << "invalid";
        }
}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: B
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include<simplecpp>
int sum (int m , int n) {
  int result = m+n ;
  return (result);
}
main_program {
    int a ;
    int b ;
cin >> a >> b ;
 sum (a,b);
if ( sum(a,b) > 9999 || sum(a,b) <= 999 || 1999 < sum(a,b) <= 2999 || 5999 < sum(a,b) <= 6999 || 8999 < sum(a,b) <= 9999) {
    cout << "invalid" << endl;
}
if ( 999 < sum(a,b) <= 1999 || 2999 < sum(a,b) <= 3999 || 3999 < sum(a,b) <= 4999) {
    cout << "2159" << sum(a,b) << endl ;
}
if ( 4999 < sum(a,b) <= 5999 || 6999 < sum(a,b) <= 7999 || 7999 < sum(a,b) <= 8999) {
    cout << "2576" << sum(a,b) << endl ;
}
}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include<simplecpp>
main_program
{
    int n1,n2,sum;
    cin>>n1>>n2;
    sum=n1+n2;
    if(sum>=0&&sum<1000)
    cout<<"invalid"<<endl;
    else if ((sum>=1000&&sum<2000)|| (sum>=3000&&sum<5000))
    cout<<"2159"<<sum<<endl;
    else if ((sum>=5000&&sum<6000)||(sum>=7000&&sum<9000))
    cout<<"2576"<<sum<<endl;
    else
       cout<<"invalid"<<endl;

}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include<bits/stdc++.h>
using namespace std;

int main(){

	int num1,num2;
	
	cin >> num1;
	
	cin >> num2;

	int sum=num1+num2;
	int checker=sum/1000;

	if(checker==1 || checker==3 || checker==4){cout << "2159"<<sum<< endl;}
	else if(checker==5|| checker==7 || checker==8){cout << "2576"<<sum<< endl;}
	else{ cout << "invalid ";}
}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include <iostream>
using namespace std;
int main() {
    int n1;
    int n2;
    cin>>n1;
    cin>>n2;
    int sum = n1+n2;
    if(sum>=1000 && sum<2000) cout<<(21590000+sum);
    else if(sum>=3000 && sum<5000) cout<<(21590000+sum);
    else if(sum>=5000 && sum<6000) cout<<(25760000+sum);
    else if(sum>=7000 && sum<9000) cout<<(25760000+sum);
    else if(sum>=9000 || sum<1000) cout<<"invalid";
    else if(sum>=2000 && sum<3000) cout<<"Invalid";
    else if(sum>=6000 && sum<7000) cout<<"Invalid";

}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A
Problem: college X telephone exchange office has been struggling with a problem that the phone system is getting mixed up and connecting callers to wrong numbers. The users dial a 4 digit number, and the telephone exchange needs to extend it to an 8 digit number by prefixing it with 2159 or 2576, according to certain rules (see below). However, it has been noticed that  when a user dials a 4-digit number, an old system which can handle only 8-digit numbers arbitrarily encodes it into two 4-digit numbers whose sum is the dialed number.

You’ve been appointed to create a solution that will automatically translate the two 4-digit numbers received from the system into the correct 8-digit phone number. 
Write a C++ program that accepts two non-negative integers as input from the user, adds them to get a 4-digit number xxxx (the number originally dialed), and prints out 2159xxxx or 2576xxxx, according to the following rules. Certain dialed numbers are invalid, and in those cases the output should simply say “invalid.”
first digit of the dialed number xxxx	prefix	Output
1xxx/3xxx/4xxx	2159	2159xxxx
5xxx/7xxx/8xxx	2576	2576xxxx
0xxxx/2xxx/6xxx/9xxx		invalid

Input Format Two positive integers separated by a space.

Output Format An 8-digit number, or invalid

Assumptions on Input
●	0 <= m <= 9999 (m may omit leading zeros).
●	0 <= n <= 9999 (n may omit leading zeros).
●	0 <= m + n <= 9999.

Student submission:
#include<simplecpp>
main_program{
    int n,m;
    cin>>n>>m;
    int x =m+n;
    if(x<0 && x>9999 && m<0 &&m>9999 && n<0 &&n>9999){
        cout<<"Invalid";
    }
    else{
        int k=x/1000;
        if(k==0||k==2||k==6||k==9){
            cout<<"invalid";
        }
        else if(k==1||k==3||k==4){
            cout<<"2159"<<x;
        }
        else if(k==5||k==7||k==8){
            cout<<"2576"<<x;
        }
    }
}

Grading criterion: Condition for 2159
Rating A: correctly checks the condition for the extension 2159
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A