/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: lamps.cpp * Author: cteam047 * * Created on December 2, 2018, 9:47 AM */ #include #include #include using namespace std; /* * */ int main(int argc, char** argv) { int count; scanf("%d", &count); for (int i = 0; i < count; i++) { int total = 0; int objem; scanf("%d", &objem); int delka_strany = (int) floor(sqrt(objem)); while (delka_strany != 0) { int treti_strana = floor((double) objem / (double) (delka_strany * delka_strany)); while (treti_strana != 0) { treti_strana--; total++; }//total+=treti_strana; delka_strany--; } printf("%d\n", objem - total); } return 0; }