题解列表

筛选

The Kth great number

摘要:#include <bits/stdc++.h>#define debuga(v, i) cout << #v << "[" << i << "]" << " = " << v[i] << &#39;……

2791: 计算邮资

摘要:解题思路:注意事项:单字符用char,注意单个字符要用单引号括起来,字符串要用双引号。还要用ceil函数来解决大于1000克但小于一个500克的计数单位。参考代码:#include<bits/stdc……

C++ 计算器 模拟题

摘要:#include <bits/stdc++.h> #define debuga(v, i) cout << #v << "[" << i << "]" << " = " << v

[编程入门]筛选N以内的素数

摘要:解题思路:大于2的偶数都是合数,所以找的时候每次步进2。后面试除时只要除找到素数就行了注意事项:参考代码:#include <stdio.h> #include <stdlib.h> type……

1106: 奖学金 (二维数组)

摘要:解题思路:将所有信息存放至二维数组并依据总分,语文成绩降序排序,依据学号升序排序注意事项:参考代码:def scholarship_ranking():    # 读取学生数量    n = int(……

刷题是熟练的必经之路

摘要:解题思路:多看几遍就记住了注意事项:参考代码:#include<stdio.h>#include<stdbool.h>#include<math.h>bool judge(int n);int mai……

普普通通的解题方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main (){ double y; int x;  scanf ("%d",&x); if (x < 1) { y = x;……