数字反转(简单思路) 摘要:解题思路:用long long输入即可,用数组判断前导0注意事项:注意输入会有负数,则输出需要“-”注意下面的for循环a[-1]=0的用法参考代码:#include<bits/stdc++.h>us…… 题解列表 2023年03月23日 0 点赞 0 评论 412 浏览 评分:0.0
C++数字反转 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>#include<cmath>#include<algor…… 题解列表 2026年03月04日 0 点赞 0 评论 100 浏览 评分:0.0
题解 2819: 数字反转 摘要:解题思路:注意事项:注意第7行要写一个合并数位的小算法;第8行要写一个分解数列的算法参考代码:#include<bits/stdc++.h>using namespace std;int …… 题解列表 2025年01月12日 1 点赞 0 评论 305 浏览 评分:0.0
题解 2819: 数字反转 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ long long n,sum=…… 题解列表 2025年01月12日 0 点赞 0 评论 331 浏览 评分:0.0
2819: 数字反转题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n,sum=0; cin &…… 题解列表 2025年01月11日 0 点赞 0 评论 316 浏览 评分:0.0
b每次左移一位,为a的个位数求模留出空间 摘要:解题思路:建立新变量b=0。由于b的值是累加不断更新,因此初始值需要是0。循环逻辑:b每次左移一位,为a的个位数求模留出空间。数值更新:a每次同样左移,不断保存前一位的值,回溯到上面的循环里。参考代码…… 题解列表 2024年12月06日 0 点赞 0 评论 263 浏览 评分: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 评论 590 浏览 评分:0.0
编写题解 2819: 数字反转 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n,ans=0; cin>…… 题解列表 2024年02月26日 0 点赞 0 评论 330 浏览 评分:0.0
题解 2819: 数字反转 摘要:解题思路:注意事项:参考代码:#include <iostream>//忘用万能头了using namespace std;int main(){ long long a;//数大,int装不下…… 题解列表 2024年01月16日 1 点赞 0 评论 275 浏览 评分:0.0
2819: 数字反转 摘要:解题思路:注意事项:参考代码:include <bits/stdc++.h>using namespace std;int main(){ long long n=0,a,b,sum=0;//s…… 题解列表 2024年01月16日 0 点赞 0 评论 295 浏览 评分:0.0