编写题解 2818: 分离整数的各个数位 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){long long a; cin>>a;while(a){co…… 题解列表 2024年05月26日 0 点赞 0 评论 135 浏览 评分:0.0
分离整数的各个数位(两种解法) 摘要:1亿还是比较小的数,简单点用long long即可 代码如下: \#include using namespace std; int main() { long long n; ci…… 题解列表 2023年03月23日 0 点赞 0 评论 129 浏览 评分:0.0
2818: 分离整数的各个数位 摘要:解题思路:注意事项:参考代码:n = str(input())for i in range(len(n)-1,-1,-1): print(n[i],end=" ")…… 题解列表 2024年07月30日 0 点赞 0 评论 165 浏览 评分:0.0
题解 2818: 分离整数的各个数位 摘要:解题思路:首先读取输入的整数 n。使用循环,当 n 不为 0 时执行以下步骤。在循环中,将 n 对 10 取余数,得到当前的个位数字。输出该数字,并在后面加上一个空格。将 n 除以 10,去掉已经处理…… 题解列表 2024年01月16日 0 点赞 0 评论 165 浏览 评分:6.0
题解 2818: 分离整数的各个数位(while循环的引入) 摘要:解题思路:还记得如何分离整数的各个数位吗?//以三位数为例 cout<<n%10<<endl; cout<<n/10%10<<endl; cout<<n/10/10%10<<endl;但本题中,…… 题解列表 2023年07月12日 1 点赞 0 评论 653 浏览 评分:6.3
优质题解 2818: 分离整数的各个数位(详细题解) 摘要:题目描述: 给定一个整数,要求从个位开始分离出它的每一位数字,并按照从低位到高位的顺序依次输出每一位数字。解题思路:1. 首先读取输入的整数 n。2. 使用循环,当 n 不为 0 时执行以下步骤。3…… 题解列表 2023年07月13日 0 点赞 2 评论 1220 浏览 评分:7.9
2818: 分离整数的各个数位 摘要:解题思路:注意事项:参考代码:a = input() for i in a[::-1]: print(i,end=' ')代码2:a = input() a = a[::…… 题解列表 2023年02月22日 0 点赞 0 评论 292 浏览 评分:9.0
极致简约版 2818: 分离整数的各个数位 摘要:解题思路: 注意事项:参考代码:print(" ".join(input()[::-1]))…… 题解列表 2024年03月17日 0 点赞 0 评论 269 浏览 评分:9.9
2818:老套路-(除十模十)-C语言 摘要:解题思路:注意事项:参考代码:#include <stdio.h> void func(long long n); int main() { long long a; scanf("%…… 题解列表 2022年12月20日 0 点赞 1 评论 439 浏览 评分:9.9