编写题解 2819: 数字反转 摘要:解题思路:注意事项:参考代码:n=input()fn=str(abs(int(n)))#取整+绝对值+字符串,避免‘-’的影响r=0#反转新数for j in range(len(fn)-1,-1,-…… 题解列表 2024年03月02日 0 点赞 0 评论 178 浏览 评分:0.0
题解 2819: 数字反转 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b=0; scanf("%d"…… 题解列表 2025年01月26日 1 点赞 0 评论 134 浏览 评分:0.0
很新手的解题,想到什么就写什么,你绝对能看懂 摘要:解题思路:把输入的数的各个位数依次取出来存在数组里,再取出来组成反转的数注意事项:参考代码:#include<stdio.h>#include<math.h>int…… 题解列表 2025年01月23日 0 点赞 0 评论 151 浏览 评分:0.0
题解 2819: 数字反转 摘要:解题思路:注意事项:注意第7行要写一个合并数位的小算法;第8行要写一个分解数列的算法参考代码:#include<bits/stdc++.h>using namespace std;int …… 题解列表 2025年01月12日 0 点赞 0 评论 108 浏览 评分:0.0
题解 2819: 数字反转 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ long long n,sum=…… 题解列表 2025年01月12日 0 点赞 0 评论 96 浏览 评分:0.0
2819: 数字反转题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n,sum=0; cin &…… 题解列表 2025年01月11日 0 点赞 0 评论 130 浏览 评分:0.0
b每次左移一位,为a的个位数求模留出空间 摘要:解题思路:建立新变量b=0。由于b的值是累加不断更新,因此初始值需要是0。循环逻辑:b每次左移一位,为a的个位数求模留出空间。数值更新:a每次同样左移,不断保存前一位的值,回溯到上面的循环里。参考代码…… 题解列表 2024年12月06日 0 点赞 0 评论 109 浏览 评分:0.0
C语言函数解决-不考虑前导0的情况 摘要:解题思路:注意事项:参考代码:#include<stdio.h> void kr(int n); int main() { int n; scanf("%d",&n…… 题解列表 2022年11月28日 0 点赞 0 评论 169 浏览 评分:0.0
2819: 数字反转 摘要:解题思路:注意事项:参考代码:n = int(input())if n >= 0: s = str(n)[::-1] print(int(s))else: n = -n s =…… 题解列表 2024年07月30日 0 点赞 0 评论 179 浏览 评分:0.0
编写题解 2819: 数字反转 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){long long n,m=0; cin>>n;while(n…… 题解列表 2024年05月14日 0 点赞 0 评论 402 浏览 评分:0.0