Sanitator

Untitled

Nov 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n; cin >> n;
  8.     long long sum = 0;
  9.     while(n--)
  10.     {
  11.         long long a; cin >> a;
  12.         sum += a;
  13.  
  14.         cout << (int)sqrt(sum) << "\n";// приведение типа данных
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment