Sqrt Bo (水题)

#include<bits/stdc++.h>
using namespace std;

long long arr[10], comp;
char str[107];

int main(){
    arr[0] = 1LL;
    for(int i = 1; i < 6; i ++)
        arr[i] = (arr[i - 1] + 1) * (arr[i - 1] + 1) - 1;
    while(~scanf("%s", str)){
        int len = strlen(str);
        if(len > 10){
            printf("TAT
");
        }else{
            sscanf(str, "%lld", &comp);
            if(comp > arr[5] || !comp)printf("TAT
");
            else printf("%d
", lower_bound(arr, arr + 6, comp) - arr);
        }
    }
    return 0;
}
more crazy more get!
原文地址:https://www.cnblogs.com/wethura/p/9789007.html