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{
    unsigned int n1,n2;
    cin >> n1 >> n2;
    int sum=n1+n2;
    int d=sum/1000;
    if(d==1||d==3||d==4) cout<<"2159"<<sum;
    else if(d==5||d==7||d==8) cout<<"2576"<<sum;
    else cout<<"invalid";
}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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;
    cin>>n1>>n2;
    int sum=n1+n2;
    int d=sum/1000;
    
    if(d==1 || d==3 || d==4)
    {
        cout<<"2159"<<sum;
    }
    if(d==5 || d==7 || d==8)
    {
        cout<<"2576"<<sum;
    }
    if(d==0 || d==2 || d==6 || d==9)
    {
        cout<<"invalid";
    }

}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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,a;
    cin>>n1>>n2;
    int sum=n1+n2;
    if((sum/1000==1) || (sum/1000==3) || (sum/1000==4)){
        a=2159;
        cout<<a<<sum;
    }
    if ((sum/1000==5) || (sum/1000==7) || (sum/1000==8)){
        a=2576;
        cout<<a<<sum;
    }
    if ((sum/1000==0) || (sum/1000==2) || (sum/1000==6) || (sum/1000==9)){
        cout<<"invalid";
    }
}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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 (){

}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: C
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,c;
    cin>>a>>b;
    c=a+b;
    if(c/1000 == 0 || c/1000 == 2 || c/1000 == 6 || c/1000 == 9) {cout<<"invalid"<<endl;}
    else if(c/1000 == 1 || c/1000 == 3 || c/1000 == 4) {cout<<"2159"<<c<<endl;}
    else if(c/1000 == 5 || c/1000 == 7 || c/1000 == 8) {cout<<"2576"<<c<<endl;}

}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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;
    cin>>n;
    int sum=m+n;
    if(sum>=1000 && sum<2000 || sum>=3000 && sum<5000){
        cout<<"2159"<<sum;
    }
    else if(sum>=5000 && sum<6000 || sum>=7000 && sum<9000){
        cout<<"2576"<<sum;
    }
    else 
    {cout<<"Invalid";}
}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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,0<=m<=9999,int n,0<=n<=9999,int s=m+n,0<=s<=9999;cin >> m n;
    cout <<s <<endl;
int p,0<=p<=9;
if (s==1ppp|| s==3ppp||s=4ppp){
    cout << 2159s <<endl;
}
else if (s==5ppp|| s== 7ppp||s==8ppp){
    cout << 2576s << endl;
}
else {
    cout << "invalid"<<endl;
}
}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: C
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, e;
    cin >> a >> b;
    int c = a + b;
    int d = c/1000;
    if (d == 1 || d == 3 || d == 4) {
        e = 21590000 + c;
        cout << e << endl;
    }
    if (d == 5 || d == 7 || d == 8) {
        e = 25760000 + c;
        cout << e << endl;
    }
    if (d == 0 || d == 2 || d == 6 || d == 9 ) {
        cout << "invalid" << endl;
    }
}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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,y;
    cin>>y>>n;

    if(1000<=y+n<=1999 || 3000<=y+n<=3999 || 4000<=y+n<=4999) {
        cout<<"2159"<<y+n;
    }
     else if (5000<=y+n<=5999 || 7000<=y+n<=7999 || 80000<=y+n<=8999) {
        cout<<"2576"<<y+n;
     }
     else  {
        cout<<"invalid";
     }

     return 0;
}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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;
    cin>>n;
    int sum= m+n;
    if(sum/1000 == 1 || sum/1000 == 3 || sum/1000 == 4){
        cout<<"2159"<<sum;
    }
    else if(sum/1000 == 5 || sum/1000 == 7 || sum/1000 == 8){
        cout<<"2576"<<sum;
    }
    else{
        cout<<"invalid";
    }
}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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 c,d,f,g;
    cin>>c>>d;
    f= c+d;
    g=f/1000;
    if(g==1 || g==3 || g==4){
        f+=21590000;
        cout<<f;

    }
    else if (g==5 || g==7 || g==8){
        f+=25760000;
        cout<<f;
    }
    else 
    cout<<"Invalid"<<endl;

}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
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 num1,num2;
cin >>num1 >>num2;
int num = num1+ num2;

if (num <1000) cout<< "invalid";
else if (num<2000) cout<<"2159"<< num;
else if (num <3000)cout<<"invalid";
else if (num <5000)cout<<"2159"<< num;
else if (num <6000)cout<< "2576"<< num;
else if (num <7000)cout<<"invalid";
else if (num <9000)cout<<"2576"<<num;
else cout << "invalid";
}

Grading criterion: Sum the integers
Rating A: correctly sums the integers
Rating B: Some issue
Rating C: Major issue
Rating D: 0
Assigned grade: A