三位数反转 (C语言代码) 摘要:解题思路:用字符串保存直接反输出注意事项:直接输出printf("%c%c%c",s[2],s[1],s[0]);是错误的 因为输入两位数的时候,s[2]是'\0'了参考代码:#in…… 题解列表 2018年07月26日 1 点赞 0 评论 1805 浏览 评分:6.0
三位数反转-题解(C++代码) 摘要:不会的小伙伴来看看哦,答案错50%的也来看看。 首先注意看题目,输入一个三位数,分离出它的百位、十位和个位,反转后输出。(有多组输入数据),这个很重要,可以用while 循环输入,while(cin…… 题解列表 2020年01月31日 0 点赞 3 评论 817 浏览 评分:5.1
三位数反转-题解(Python代码) 摘要:这道题可以通过取巧的方式来解答 直接当做字符串来反转即可 也不用考虑100反转后要输出001的问题 代码如下: ```python n = str(input()) while 1: …… 题解列表 2020年03月21日 0 点赞 0 评论 926 浏览 评分:4.4
三位数反转-题解(C++代码) 摘要:# 细节 多组输入数据。 分离出来的个位、十位、百位数字,直接输出。 不要计算逆序后的值再输出,会丢失低位的 0 。比如 500。 # 代码 ```cpp #include int…… 题解列表 2020年01月04日 0 点赞 0 评论 675 浏览 评分:2.0
三位数反转 (C语言代码) 摘要:解题思路:注意事项:输出数必须分离,否则错。参考代码:#include<stdio.h>int main(){ int x,i,a,b,c; while((i = scanf("%d",&x))!= …… 题解列表 2019年02月13日 0 点赞 0 评论 1055 浏览 评分:2.0
编写题解 1866: 三位数反转 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 200 浏览 评分:0.0
2025.7.19刷题记录 摘要:解题思路:通过while循环实现多组数据的输入 循环条件为 scanf("%d",&num)!=EOF 取出个位数十位数百位数就可以了注意事项:当scanf输入的数据和规定…… 题解列表 2025年07月19日 0 点赞 0 评论 185 浏览 评分:0.0
1866: 三位数反转 摘要:解题思路:切片注意事项:参考代码:while True: try: a = input() print(a[::-1]) except: brea…… 题解列表 2024年12月26日 0 点赞 0 评论 448 浏览 评分:0.0
1866: 三位数反转 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { …… 题解列表 2023年10月09日 0 点赞 0 评论 222 浏览 评分:0.0
1866: 三位数反转 摘要:解题思路:这题有多行输入,可能会造成错误注意事项:参考代码:while True: try: a = list(input()) b = a[::-1] …… 题解列表 2024年12月21日 0 点赞 0 评论 373 浏览 评分:0.0