1 solutions

  • 0
    @ 2025-11-5 17:00:15

    C :

    int main() {
            int n, score, i;
            for (i = 1;i <= 50;i++) {
                    scanf("%d %d", &n, &score);
                    if (score >= 80)
                            printf("%d %d\n", n, score);
            }
            return 0;
    }
    

    C++ :

    #include <stdio.h>
    #include <math.h>
    #include<string.h>
    #include<fstream>
    #include<iostream>
    #include<algorithm>
    #include<math.h>
    using namespace std;
    
    
    int main(int argc, char* argv[])
    {  
    	//freopen("test.txt","r",stdin);
    	int num,score;
    	while(scanf("%d %d",&num,&score)!=EOF){
    		if(score>=0&&score<=100){
    		if(score>=80)
    			printf("%d %d\n",num,score);}
    		else 
    			break;
    	}
    	//fclose(stdin);
    	return 0;
    }
    
    • 1

    Information

    ID
    18136
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By