摘要:
思路: 取每一位, 第一位和第四位相同, 第二位和第三位相同即回文数. 1 #include <iostream> 2 using namespace std; 3 4 int main() 5 { 6 ios::sync_with_stdio(false); 7 cin.tie(0); 8 9 f 阅读全文
posted @ 2020-02-01 17:02
域Anton
阅读(164)
评论(0)
推荐(0)
摘要:
思路: 水仙花数, 取到每一位求立方的和判断. 1 #include <iostream> 2 using namespace std; 3 4 int main() 5 { 6 ios::sync_with_stdio(false); 7 cin.tie(0); 8 9 for (int i = 阅读全文
posted @ 2020-02-01 16:59
域Anton
阅读(125)
评论(0)
推荐(0)
摘要:
思路: 让二维数组初始化为0, pas[0][0] = 1, 然后就能模拟了. pas[i][j] = pas[i - 1][j - 1] + pas[i - 1][j]; 1 #include <iostream> 2 using namespace std; 3 4 int pas[50][50 阅读全文
posted @ 2020-02-01 16:53
域Anton
阅读(137)
评论(0)
推荐(0)
摘要:
思路: 开数组初始化为0, 下标对应数, 值对应数第一次出现的位置. 每输入一个数, 看在数组中的值是否为0进行操作. 1 #include <iostream> 2 using namespace std; 3 4 int arr[10005]{0}; 5 6 int main() 7 { 8 i 阅读全文
posted @ 2020-02-01 16:32
域Anton
阅读(152)
评论(0)
推荐(0)

浙公网安备 33010602011771号