题解列表

筛选

2920: 分数线划定

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; struct u {     string str;     int……
优质题解

题解 1051: [编程入门]结构体之成绩统计2

摘要:解题思路:阅读题目,我们可以发现,本题分为两个任务:一、计算三科分别的平均成绩。二、输出成绩最高的学生的信息。先来本题所需的主要知识点:结构体结构体的用处是定义一个“数据类型”。每个数据类型内包括各类……

1866:三位数反转(C++)

摘要:解题思路:百位数为i/100;十位数为1/10-i/100*10;个位数为i-i/100*100-(i/10-i/100*10)*10注意事项:此题目含“有多组测试数据”则需要用循环结构参考代码:#i……

感觉不错的方法

摘要:解题思路:用布尔函数判断是否为素数注意事项:参考代码:#include<iostream>using namespace std;int main(){    int a = 0;    cin >>……

for循环简单解题

摘要:解题思路:注意事项:是s【f-1】,不是s【i-】哦!!!参考代码:#include <bits/stdc++.h>using namespace std;int main(){ string s; ……

编写题解 2779: 输出绝对值

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    double a;    cin>>a;    pr……