【回文数(二)】 (C语言代码) 摘要:解题思路:注意事项: 在这里我用数组从a[0]开始存放数的最低位,a[i]存放高位,便于适应结果数的位数增长,易实现算法参考代码:#include<stdio.h> #include<string.…… 题解列表 2018年12月26日 0 点赞 0 评论 516 浏览 评分:0.0
【回文数(二)】 (C语言代码) 摘要:#include<stdio.h> #include<string.h> typedef long long ll; int base;//base 记录进制 char f[100]; v…… 题解列表 2017年08月22日 0 点赞 0 评论 1068 浏览 评分:0.0
【回文数(二)】 (C语言代码)不要在for中定义变量!!! 摘要:解题思路:将输入的值存到数组a【】中,在逆序存到b【】中,再a【】+b【】存到a【】中,在函数中注意进制的转换,在判断a【】中的值是否为回文数,否则递归。注意事项:不要在for语句中定义变量 不然a…… 题解列表 2018年08月18日 0 点赞 0 评论 640 浏览 评分:0.0
【回文数(二)】 还是用数组吧 摘要:解题思路: 1,考虑到十进制以上,用字符串数组储存所输入的数字。 2,编写change函数将字符串数组的元素全部转化成数字,再储存在全局数组a中; …… 题解列表 2019年02月13日 1 点赞 0 评论 1011 浏览 评分:0.0
题解 1161: 回文数(二)(python) 摘要:def n_to_ten(n,m): j = 0 sum =0 for i in str(m)[::-1]: sum += int(i)*n**j …… 题解列表 2021年12月24日 0 点赞 0 评论 234 浏览 评分:0.0
【回文数(二)】 (C语言代码) 摘要:#include <stdio.h> #include <string.h> #include <ctype.h> int main() { int n,step=0,num[3000]=…… 题解列表 2017年11月23日 0 点赞 0 评论 826 浏览 评分:0.0
【回文数(二)】 (C语言代码)发表出来当保存,方便以后阅读。 摘要:#include<stdio.h> int save(int a[], int m)//将数m的值存入数组中,并返回位数。 { int i; for(i = 0; m >…… 题解列表 2018年06月14日 4 点赞 1 评论 508 浏览 评分:2.0
【回文数(二)】 (C++代码) 摘要:解题思路:注意事项:参考代码:#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <…… 题解列表 2018年10月13日 0 点赞 0 评论 526 浏览 评分:2.0
huiwenshupanduan 摘要:解题思路:注意事项:参考代码:#include "stdio.h"#include "string.h"int PANDUAN(char s[100]) { int h = strlen(s); fo…… 题解列表 2021年08月20日 0 点赞 0 评论 165 浏览 评分:5.0
【回文数(二)】-题解(C/C++语言代码)(简单易懂) 摘要:#### 解题思路: 将相加完之后的数判断是否为回文数时,判断反转与原数相等即可即可 在该题中用到了strtol函数,其中endptr 为 0,则表示该参数无效,或不使用该参数。 以下链接介…… 题解列表 2020年02月04日 0 点赞 0 评论 528 浏览 评分:5.4