1810: [编程基础]输入输出练习之精度控制3(c语言代码,包懂版) 摘要:题目说了只有数字是靠右对齐,字符不用 整型是靠右对齐4位**%4.d** 单精度是靠右对齐4位,保留4位小数**%4.2f** 双精度是靠右对齐4位,保留12位小数**%4.12lf** ``…… 题解列表 2024年08月07日 1 点赞 0 评论 293 浏览 评分:0.0
(c语言代码) 摘要:解释一下,%e是科学计数法的形式输出,%g用来输出浮点数,系统会自动选 f 格式或 e 格式输出,但选择其中长度较短的格式,不输出无意义的0 ```c #include int main() …… 题解列表 2024年08月07日 0 点赞 0 评论 364 浏览 评分:0.0
奖学金:结构体多关键字排序 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <algorithm> using namespace std; struct st{ int sn,…… 题解列表 2024年08月08日 2 点赞 0 评论 314 浏览 评分:0.0
字符串分类统计 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> int main() { int letters = 0, digit…… 题解列表 2024年08月08日 1 点赞 0 评论 265 浏览 评分:0.0
Python的辗转相除 摘要:def gcd(a,b): while b: a,b=b,a%b return a a=int(input()) b=int(input()) print(…… 题解列表 2024年08月08日 0 点赞 0 评论 164 浏览 评分:0.0
辗转相除最终归纳! 摘要:1.c++写#include<bits/stdc++.h> using namespace std; int _gcd(int a,int b) { while(b!=0)//可以简写…… 题解列表 2024年08月08日 0 点赞 0 评论 231 浏览 评分:0.0
原来不难,就只有第一个单词特殊啊 摘要:#include<bits/stdc++.h> using namespace std; int main() { string s; while(getline(cin,s)) {…… 题解列表 2024年08月08日 0 点赞 0 评论 142 浏览 评分:0.0
这个题细节很多,wa了很多次 摘要:#include<bits/stdc++.h> using namespace std; int main() { int n; string s; cin>>n>…… 题解列表 2024年08月08日 0 点赞 0 评论 219 浏览 评分:0.0
1108: 守望者的逃离 贪心 摘要:解题思路:贪心注意事项:参考代码:#include<iostream> #include<cmath> using namespace std; int main() { int m,s,…… 题解列表 2024年08月08日 2 点赞 0 评论 409 浏览 评分:0.0
1159: 偶数求和的一种解决方法 摘要:解题思路:题目对数列的定义是长度为n,公差为2的一个等差数列,那么可以这样理解数列中的每个元素值都是k=2*i(i=1,2,3.....n),这样每次求和只需要变量sum加上2*i即可。当i等于m的倍…… 题解列表 2024年08月09日 0 点赞 0 评论 163 浏览 评分:0.0