Skip to content

Commit

Permalink
ICPCarchive/2557
Browse files Browse the repository at this point in the history
  • Loading branch information
userr2232 committed Feb 12, 2021
1 parent ddf7be4 commit b632206
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ICPCarchive/2557.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <iostream>
#include <cmath>

using namespace std;

int main() {
int n;
cin >> n;
for(int i = 0; i < n; ++i) {
int t;
cin >> t;
int count{0};
for(int i = 1; i <= t; ++i) {
int k = sqrt(i);
if(k * k == i) ++count;
}
cout << count << endl;
}
}

0 comments on commit b632206

Please sign in to comment.