数字的处理与判断(字符串函数解法) 摘要:解题思路:利用字符串来存储数字,用strlen()函数得到数字长度;利用for循环将字符串从左到右遍历输出(空格);利用for循环将字符串从右到左遍历输出;注意事项:1、在开头添加库函数#includ…… 题解列表 2024年09月14日 0 点赞 0 评论 395 浏览 评分:0.0
数字的处理与判断 摘要:解题思路:转化为字符串问题注意事项:字符串反转,双指针参考代码:#include<bits/stdc++.h>using namespace std;string ver(string s){//反转…… 题解列表 2024年10月19日 0 点赞 0 评论 578 浏览 评分:0.0
只用循环做出本题 摘要:解题思路:穷举每个情况注意事项:想好逻辑就行参考代码:#include<stdio.h>int main(){ int n; scanf("%d", &n); …… 题解列表 2024年11月14日 2 点赞 0 评论 647 浏览 评分:0.0
1009: [编程入门]数字的处理与判断(简单暴力) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[10]; gets(a); int len=…… 题解列表 2024年11月16日 1 点赞 0 评论 890 浏览 评分:0.0
题解 1009: [编程入门]数字的处理与判断 摘要:解题思路:使用string和algorithm中函数即可轻松完成要求注意事项:参考代码:#include <iostream>#include <string>#include…… 题解列表 2025年02月24日 7 点赞 0 评论 1509 浏览 评分:0.0
C++:vector容器练习 输入单个字符 感觉实际上比较通用 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std ;int main ( ){&nbs…… 题解列表 2025年03月22日 2 点赞 0 评论 898 浏览 评分:0.0
5行解决,且代码简单易懂 摘要:解题思路:注意事项:参考代码:s=input()print(len(s))for i in s: print(i,end=' ')print()print(s[::-1])…… 题解列表 2025年05月02日 1 点赞 0 评论 1114 浏览 评分:0.0
先求每一位的数,存放到数组中 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b[5],n,m; scanf("%d",&a); b[4]…… 题解列表 2026年03月09日 2 点赞 0 评论 476 浏览 评分:0.0
在哪你都看得到我记住这句话 摘要:解题思路:直接把它当作字符串处理,个数就是s.size()再用两个循环进行顺逆输出注意事项:参考代码:#include<iostream>#include<…… 题解列表 2026年03月19日 2 点赞 0 评论 1038 浏览 评分:0.0