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 a,b;
    cin>>a>>b;
    int c=a+b;
    int d=c/1000;
    if(d==1 || d==3 || d==4){
        cout<<21590000+c;
    }
    if(d==5 || d==7 || d==8){
        cout<<25760000+c;
    }
    if(d==0 || d==2 || d==6 || d==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 <iostream>
using namespace std;
int main(){
    int n1,n2,n;
    cin>>n1>>n2;
    n=n1+n2;
    if(n/1000==0 || n/1000==2 || n/1000==6 || n/1000==9) cout<<"invalid";
    else if(n/1000==1 || n/1000==3 || n/1000==4) cout<<"2159"<<n;
    else if(n/1000==5 || n/1000==7 || n/1000==8) cout<<"2576"<<n;
    return 0;
}

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,s;
    cin>>n1>>n2;
    s=n1+n2;
    if (s/1000==1 || s/1000==3 || s/1000==4)
    {
        int p=21590000+s ;
        cout<<p;
    }
    else if (s/1000==5 || s/1000==7 ||s/1000==8)
    {int p=25760000+s;
    cout<<p;}
    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 n1,n2;
    cin >> n1 >> n2;
    int sum = n1 + n2;
    int firstdigit = sum/1000;
    if (firstdigit==0||firstdigit==2||firstdigit==6||firstdigit==9)
    {
        cout << "invalid";
    }
    else if (firstdigit==1||firstdigit==3||firstdigit==4)
    {
        cout << 2159 << sum;
    }
    else if (firstdigit==5||firstdigit==7||firstdigit==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 n,m,k;
cin>>n>>m;
k=m+n;
if ((k/1000)==1 || (k/1000)==3 || (k/1000)==4)
{
k+=21590000;
cout<<k;
}
else if ((k/1000)==5 || (k/1000)==7 || (k/1000)==8)
{
k+=25760000;
cout<<k;
}
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
{
    unsigned int n,m;
    cin>>n>>m;
    int sum=n+m;
    int num=sum;
    int newnum;
    if(0<=sum && sum<=9999)
    {
        sum/=1000;
        if(sum==1 || sum==3 ||sum==4)
        {
            newnum=((2159*10000)+num);
            cout<<newnum;
        }
        if(sum==5||sum==7||sum==8)
        {
            newnum=((2576*10000)+num);
            cout<<newnum;
        }
        else
        {
            cout<<"invalid";
        }
    }
    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 a,b;
    cin >> a;
    cin >> b;
    int c = a+b;
    int d = c/1000;
    if(d==1 || d==3||d==4) {
       c = 21590000 + c;
       cout << c << endl;}
    else if(d==5||d==7||d==8){
       c = 25760000 + c;
       cout << c << endl;}
    else if(d==0||d==2||d==6||d==9)
       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 <iostream>

using namespace std;

int main(){
    int n , k ;
    cin>>n>>k;
    int c = n + k;
     if(c >= 1000 && c< 2000){
        cout<<"2159"<<c;
    }
    if(c >= 3000 && c< 4000){
        cout<<"2159"<<c;
    }
    if(c >= 4000 && c< 5000){
        cout<<"2159"<<c;
    }
    if(c >= 8000 && c< 9000){
        cout<<"2576"<<c;
    }
    if(c >= 7000 && c< 8000){
        cout<<"2576"<<c;
    }
    if(c >= 5000 && c< 6000){
        cout<<"2576"<<c;
    }if(c >= 6000 && c< 7000){
        cout<<"invalid";
    }if(c >= 2000 && c< 3000){
        cout<<"invalid";
    }if(c >= 0 && c< 1000){
        cout<<"invalid";
    }if(c >= 9000 && c< 10000){
        cout<<"invalid";
    }
    
    
return 0;
}

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{
  unsigned int m,n;
    cin>>m>>n;
    int b;
    b=m+n;
    if(m>=0 && m<=9999 && n>=0 && n<=9999){
        if(b>=1000 && b<2000 || b>=3000 && b<5000)
        cout<<"2159"<<(b);
    
    else if (b>=5000 && b<6000 || b>=7000 && b<9000)
     cout<<"2576"<<(b);
    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 n1,n2;
cin>>n1;
cin>>n2;
int sum;
sum=n1+n2;

if((((sum%10)%10)%10)==0||(((sum%10)%10)%10)==2||(((sum%10)%10)%10)==6||(((sum%10)%10)%10)==9)cout<<"invalid"<<endl;
else if((((sum%10)%10)%10)==1||(((sum%10)%10)%10)==3||(((sum%10)%10)%10)==4)cout<<"2159"<<sum<<endl;
else if((((sum%10)%10)%10)==5||(((sum%10)%10)%10)==7||(((sum%10)%10)%10)==8)cout<<"2576"<<sum<<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: 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<iostream>
using namespace std;

int main(){
    int m,n;
    cin>>m>>n;
    
    if(m>=0 && m<=9999 & n>=0 && n<=9999 ){
       cout<<"2159"<<m+n;
    }
    if(m+n > 8 ){
        cout<<""<<endl;
    }



return 0;

}

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: 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<iostream>
using namespace std;

int main() {
    cin>>0<=m <=9;

    cin>>0<=n <=9;
    
    int(the sumof m+n=0<=m+n<=9999);

cout<<"the sum of the number m + n"
}

return 0);
}

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: C