题解列表

筛选

[编程入门]二进制移位练习

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>#include<cmath>using namespace std;vector<int> arr;……

输入超过三位数的简单思路

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a, b, s, g;    scanf("%d", &a);    b = a / 100; s……

利用if对输出结果进行判断

摘要:解题思路:利用if判断输出结果即可注意事项:参考代码:#include<stdio.h>int main(){    int a,b,n;    while(~scanf("%d%d", &a, &b……

求对角线之和

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#define N 100int main(){ int n,sum=0; cin >> n;……

用内置函数解决问题

摘要:解题思路:将每个人学生的总成绩和学号用zip函数打包,可以实现学号和成绩的动态排序。用sort函数以及reverse函数先按总分大小进行排序,再来考虑总分相同的情况。注意事项:参考代码: n=int(……