标签:
HDU 5224 Tom and paper(最小周长)
Description
Input
Output
Sample Input
Sample Output
#include<cstdio> #include<cmath> int main() { int t,s,n; scanf("%d",&t); while(t--) { scanf("%d",&s); n=(int)sqrt((double) s); while(s%n) n--; n=2*(n+s/n); printf("%d\n",n); } return 0; }
标签:
原文地址:http://www.cnblogs.com/hfc-xx/p/4694098.html