输入输出练习之第二个数字 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split()) #map()方法将字符串转化为整数 print(b) #也可以转化为列表,再通过索引获取,如下, #l…… 题解列表 2022年10月17日 0 点赞 0 评论 667 浏览 评分:0.0
直接面向结果的代码 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a; cin>>a; string b; for(i…… 题解列表 2022年10月18日 0 点赞 0 评论 540 浏览 评分:0.0
C++ 类实现 : N个学生类(N<100),每个有属性 学号、姓名、三科成绩。两个成员函数 一个输入数据,一个输出。 摘要:解题思路:注意事项:参考代码:class student{public: string num, name; // 学号、名字 vector<int>v; // …… 题解列表 2022年10月18日 0 点赞 0 评论 710 浏览 评分:0.0
类实现 —— 结构体之成绩统计2 摘要:解题思路: 定义学生类(然后初始化N个<100),每个类有属性 :学号,姓名、三科成绩 :string num,name、 vector容器注意事项: 参考代码:#include <iostre…… 题解列表 2022年10月18日 0 点赞 0 评论 698 浏览 评分:0.0
最大公约数与最小公倍数 解题思路:最小公倍数和最大公约数的基本思想。最小公倍数,从两个数中大的数开始找起,最大不超过两数的乘积;最大公因数,从两数中小的数开始找起,最小不超过1.注意事项:注意空格,注意换行,注意函数原型声明,注意精简代码,注意一个是加一个是减。参考代码:#includeintgetMaxV 题解列表 2022年10月18日 0 点赞 0 评论 610 浏览 评分:0.0
编写题解 1635: 蓝桥杯算法训练VIP-整数平均值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int n; int a[100]={0}; int *p…… 题解列表 2022年10月18日 0 点赞 0 评论 487 浏览 评分:0.0
2040-同学的等待 ```cpp/*1.总等待时间最短,所以等待时间要升序排列2.总等待时间要用longlong型存储3.[0,n)与[1,n]的元素个数相同*/#include#includeusingnamespacestd;typedeflonglongLL;inta[100010];//多开10个intmain( 题解列表 2022年10月18日 0 点赞 0 评论 939 浏览 评分:0.0
1857: 姜太公钓鱼 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { int n = 0, a = 0, ans = 0; scanf("%d", &n…… 题解列表 2022年10月18日 0 点赞 0 评论 425 浏览 评分:0.0
输入输出练习之浮点数专题 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ double a; scanf("%lf",&a); printf("%f\n",a); printf("%.…… 题解列表 2022年10月19日 0 点赞 0 评论 609 浏览 评分:0.0
简单 c语言 摘要:解题思路:先找到a的一个公因数,再去找b的公因数,判断是否相等,若不相等,继续寻找注意事项:参考代码:#include<stdio.h>int main(){ int a, b,i,c,d; …… 题解列表 2022年10月19日 0 点赞 0 评论 605 浏览 评分:0.0