#include <stdio.h> #include<math.h> int main() { double a; scanf("%lf",&a); printf("%d",(int)sqrt(a)); return 0; }
用sqrt函数求平方根,最后用(int)强制取整。