编写题解 1118: Tom数 一起来试试 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void main(){ char str[10]={ '0' }; whi…… 题解列表 2022年05月11日 0 点赞 0 评论 472 浏览 评分:0.0
Tom数的解法 摘要:# 1、定义 ```cpp #include #include using namespace std; char *str; int tom; ``` # 2、输入 看似很困难,其…… 题解列表 2022年05月09日 0 点赞 0 评论 1027 浏览 评分:9.9
题目 1118: Tom数【两行代码】 摘要:解题思路:[int(i) for i in input()] :将输入的数字字符串转换为列表,其实就是迭代的过程sum() :对列表内的数据进行求和注意事项:无参考代码:while True: …… 题解列表 2022年05月06日 0 点赞 0 评论 1191 浏览 评分:9.9
Tom数(Java代码) 摘要:```java import java.util.Scanner; public class Main { public static void main(String[] args) …… 题解列表 2022年04月19日 0 点赞 0 评论 463 浏览 评分:0.0
1行代码直接ac 摘要:解题思路:注意事项:参考代码 : while True: print(sum([int(i) for i in input()]))…… 题解列表 2022年04月06日 0 点赞 0 评论 429 浏览 评分:0.0
十五行解决无废话 摘要:解题思路:利用ASC码进行字符与数字间的转换注意事项:无。参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string str;…… 题解列表 2022年04月06日 0 点赞 0 评论 355 浏览 评分:8.0
字符与数字的转换,列表求和 摘要:解题思路:外层循环保证持续输入,列表d需要结束后恢复空列表注意事项:参考代码:while True: a=int(input()) d=[] for i in str(a): …… 题解列表 2022年04月05日 0 点赞 0 评论 455 浏览 评分:0.0
没什么好说的,用用long long就可 摘要:解题思路:输入的数%10取出最低位,然后/10去掉最低位,然后OK了注意事项:要用long long!!!!!!!!!!!!!!!!!!参考代码:#include<stdio.h>#include<m…… 题解列表 2022年03月29日 0 点赞 0 评论 336 浏览 评分:0.0
纯纯小白做题家-直接上代码 摘要:解题思路://int 换成 long long,防止数据溢出。参考代码:#include<stdio.h>int main(){ long long n; long long t=0; …… 题解列表 2022年03月25日 0 点赞 0 评论 373 浏览 评分:0.0
简单想法 简单思路 简单代码 java实现 摘要:解题思路:将每一行接收位Sring 然后通过split分割成每位字符串数字用String数组保存起来最后用一个for循环通过parseInt将每一位转成int后累加即可注意事项:参考代码:class…… 题解列表 2022年03月08日 0 点赞 0 评论 493 浏览 评分:0.0