题解列表

筛选

题解 2829: 数1的个数

摘要:解题思路:分离数位注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    long long n,sum=0;    ……

1056:温度转换

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

2749:计算并联电阻的阻值

摘要:解题思路:注意事项:参考代码:int main(){    float r1 = 0 , r2 = 0 , R;    scanf("%f %f", &r1, &r2);    R = 1 / (1 ……

向上递增单次尾部循环公式求和

摘要:解题思路:构造一函数调用自身,每次调用保存上次计算的结果,每一项an都在增加,故多设一参数保存an项注意事项:循环的结束条件应与递增方向相关参考代码:/*求Sn=a+aa+aaa+…+aa…aaa(有……

C++输出所有水仙花数

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){   int i,j;   int a,b,c;      for(i……

2757:浮点数向零舍入

摘要:注意事项:参考代码:#include<stdio.h>int main(){    float a = 0;    scanf("%f",&a);    int b = 0;    b = a;   ……

2758:打印ASC11码

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    char a;    scanf("%c",&a);    printf("%d\n",a);    re……

1811:浮点数专题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    double a;    scanf("%lf", &a);    printf("%f\n", a); ……