C++代码宏定义实参实现2个数字交换,最终实现3个数字的排序 摘要:解题思路:选择排序法注意事项:暂时不明参考代码:#include<iostream>using namespace std;#define swap(x,y) {int temp=x;x=y;y=te…… 题解列表 2021年12月28日 0 点赞 0 评论 291 浏览 评分:0.0
解 1635: 蓝桥杯算法训练VIP-整数平均值 摘要:解题思路:注意事项:参考代码: n = int(input()) s = list(map(int,input().split())) print(int(sum(s)/len(s)))…… 题解列表 2021年12月29日 0 点赞 0 评论 428 浏览 评分:0.0
编写题解 1670: 拆分位数 摘要:解题思路:注意事项:参考代码: a= input() for i in a[::-1]: print(i,end=' ')…… 题解列表 2021年12月29日 0 点赞 0 评论 388 浏览 评分:0.0
编写题解 1671: 小九九 摘要:for i in range(1,10): for j in range(1,i+1): print('%-6s'%(f'{j}*{i}={i*j}…… 题解列表 2021年12月29日 0 点赞 0 评论 463 浏览 评分:0.0
利用笨办法求解 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int a; int b; while (cin >> a) { …… 题解列表 2021年12月29日 0 点赞 0 评论 336 浏览 评分:0.0
C++代码纯手写,采用实参宏定义函数交换2个字符串。字符串两两比较,自定义函数for循环,遍历实现字符串逐位比较,返回大小比较结果,立刻交换即可。保证str1<=str2<=str3 摘要:也许会有朋友说写那么复杂干什么,直接调用一个库函数进行比较多方便。一些基本但复杂的东西,C/C++的乐趣就在此。用python直接调用库函数最简洁。解题思路:C++代码纯手写,采用实参宏定义函数交换2…… 题解列表 2021年12月29日 0 点赞 0 评论 743 浏览 评分:0.0
1772: [编程入门]二进制移位练习 摘要:解题思路:注意事项:参考代码:def two_to_ten(m): j = 0 sum =0 for i in str(m)[::-1]: sum +=…… 题解列表 2021年12月29日 1 点赞 0 评论 364 浏览 评分:0.0
1853--数列排序 摘要:解题思路:注意事项:参考代码:a=int(input())m=input().split()s=[]for i in range(0,len(m)): s.append(int(m[i]))s.…… 题解列表 2021年12月30日 0 点赞 0 评论 335 浏览 评分:0.0
1725: 统计字符-C语言 摘要:```c //统计字符 #include #include #include #define max 100 int main() { char s1[max], s…… 题解列表 2021年12月30日 0 点赞 0 评论 417 浏览 评分:0.0
1726: 字符串的反码-C语言 摘要:```c #include #include #include #define max 100 int main() { char s1[max]; whil…… 题解列表 2021年12月30日 0 点赞 0 评论 333 浏览 评分:0.0