题解列表

筛选

1954: 话费计算

摘要:解题思路:注意事项:参考代码:a = int(input())s = 50 + a*0.4print("{:.1f}".format(s))……

二进制移位练习,用移位运算符<< 、>>,与运算&

摘要:解题思路:参考第一个优质题解,不理解的还可以看第一个题解因为题目为了取二进制数从右端开始的第4至7位,所以我们只需要找一个二进制数与n的二进制数的4-7位进行&运算(都是1则为1,有0则为0)。所以我……

编写题解 1159: 偶数求和

摘要:解题思路:分奇偶情况讨论注意事项:输出次数的计算参考代码:#include<iostream>using namespace std;int main(){    int n, m;    while……

tom问题 (C语言解法)

摘要:#include<stdio.h>int main(){    long n,sum;    while(scanf("%ld",&n)!=EOF)    {        sum=0;     ……

[归并排序]数组法(c++)

摘要:解题思路:先分别将两个数组各自排序,再使用归并排序注意事项:参考代码:#include <iostream>using namespace std;int main() { int n, m, t; ……