标签:search ble bsp == col style div tps for
https://pintia.cn/problem-sets/12/problems/351
1 int search(int n) 2 { 3 int count = 0; 4 int num_sqrt; //平方根的整数部分 5 int single, ten, hundred; 6 for (int i = 101; i <= n; i++) 7 { 8 num_sqrt = (int)sqrt(i); 9 if (i == num_sqrt * num_sqrt) 10 { 11 single = i % 10; 12 ten = i % 100 / 10; 13 hundred = i / 100; 14 if (single == ten || single == hundred || ten == hundred) 15 { 16 count++; 17 } 18 } 19 } 20 21 return count; 22 }
标签:search ble bsp == col style div tps for
原文地址:https://www.cnblogs.com/2018jason/p/12233341.html