编写题解 2818: 分离整数的各个数位
摘要:解题思路:注意事项:参考代码:n=input()for i in range(len(n)-1,-1,-1): print(n[i],end=' ')……
编写题解 2818: 分离整数的各个数位
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){long long a; cin>>a;while(a){co……
2818: 分离整数的各个数位
摘要:解题思路:注意事项:参考代码:n = str(input())for i in range(len(n)-1,-1,-1): print(n[i],end=" ")……
旧物有情 #2818: 分离整数的各个数位 字符串翻转法 和 模拟法
摘要:[TOC]
这道题目的数据范围比较弱,不存在类似于10000
这种需要我们考虑前导0的问题
不过大家可以思考一下如何去除前导0
# 字符串翻转法
```
#include
u……
2818 while解法
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a; int x,y; scanf("%d",&a); x=a; whil……
2025/8/1刷题记录
摘要:解题思路:通过%10取出个位数 通过/10消除个位数注意事项:参考代码:#include<stdio.h>int main(){ //y记录最后一位数字 ……
C++分离整数的各个位数
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>#include<cmath>#include<algor……
2818: 分离整数的各个数位(for循环)
摘要:```
#include
using namespace std;
int main(){
int a,b=0;
cin>>a;
for( int i=1;;i++ ){
b=……