1 solutions

  • 0
    @ 2025-11-5 19:08:20

    C :

    #include <stdio.h>
    int main(){
        int n;
        scanf("%d", &n);
        while(n--){
            int M[9], i;
            for(i = 0; i < 9; i++)
                scanf("%d", &M[i]);
            for(i = 0; i < 3; i++)
                printf("%d %d %d\n", M[i], M[i+3], M[i+6]);
            puts("");
        }
        return 0;
    }
    

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
      int a[3][3],n,t,i,j;
      cin>>n;
      for(t=1;t<=n;t++)
      {
       for(j=0;j<3;j++)
    	   for(i=0;i<3;i++)
    		   cin>>a[i][j];
       for(i=0;i<3;i++)
       {
    	   for(j=0;j<2;j++)
    		   if(a[i][j]<=10000)
    	    cout<<a[i][j]<<" ";
    		   	if(a[i][j]<=10000)
    	cout<<a[i][j]<<endl;
       }
       cout<<endl;
      }
      return 0;
    }
    
    • 1

    Information

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