1. 程式人生 > >gym-101343I-Husam and the Broken Present 1

gym-101343I-Husam and the Broken Present 1

cnblogs bit using space namespace for bsp pri ()

 1 ///水題
 2 #include <bits/stdc++.h>
 3 using namespace std;
 4 int main()
 5 {
 6     int n;
 7     int m;
 8     int ans[110];
 9     scanf("%d",&n);
10     for(int i=0;i<n;i++)
11         for(int j=0;j<n;j++)
12     {
13         scanf("%d",&m);
14         if(i==j)
15         {
16             ans[i]=sqrt(m);
17 } 18 } 19 for(int i=0;i<n;i++) 20 printf("%d ",ans[i]); 21 printf("\n"); 22 }

gym-101343I-Husam and the Broken Present 1