字符数组解Tom数 摘要:解题思路:因为int范围最高到2的31次方-1,所以改为数组注意事项:参考代码: char str[100]; while(~scanf("%s",str)) { int l,su…… 题解列表 2023年12月12日 0 点赞 0 评论 450 浏览 评分:0.0
题目不难,记住是高精度就好了 摘要:解题思路:注意事项:高精度参考代码:#include<stdio.h>int main(){ long long n,m=0; while(scanf("%lld",&n)!=EOF) {…… 题解列表 2023年12月20日 0 点赞 0 评论 512 浏览 评分:0.0
不知道为什么只有一半的分数 帮看感谢 摘要:```c #include int main() { long long n; long long sum; while((scanf("%lld",&n))!=E…… 题解列表 2024年03月17日 0 点赞 0 评论 689 浏览 评分:0.0
编写题解 1118: Tom数 摘要:解题思路:注意事项:参考代码:while True: try: print(sum(list(map(int, input())))) except: …… 题解列表 2024年04月10日 1 点赞 0 评论 777 浏览 评分:0.0
超级简单的c++(新手教程) 解题思路:连续用两个while循环,第一个是为了不停的获取数字,第二个才是每个数字的具体实现。在第二个while循环中,用n%10不停的取最后一位数字,直到n/10为零的时候,说明取完了。再用sum不停的相加。就这么简单的完成啦!注意事项:参考代码:#includeusingnam 题解列表 2024年05月02日 0 点赞 0 评论 471 浏览 评分:0.0
1118Tom数(单个字符while循环求和输出) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;int main(){ char a; int sum = …… 题解列表 2024年06月12日 0 点赞 0 评论 550 浏览 评分:0.0
牢第,包你懂的 摘要:对数据类型不了解的看这里:[C语言 中的 数据类型 超详解](https://blog.csdn.net/weixin_44982036/article/details/108773054 "C语言 …… 题解列表 2024年08月10日 0 点赞 0 评论 512 浏览 评分:0.0
1118: Tom数 C++ 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { long long n; while(cin >>…… 题解列表 2024年08月11日 0 点赞 0 评论 594 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>long f(long a){ long sum=0; while(a) { sum+=a%10; …… 题解列表 2024年12月08日 2 点赞 1 评论 805 浏览 评分:0.0
1118: Tom数(C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>intmain(){charstr[10…… 题解列表 2026年03月23日 0 点赞 0 评论 210 浏览 评分:0.0