P1001C++排序+素数 摘要:解题思路:就一个排序(直接使用sort即可)和判定素数注意事项:参考代码:#include <iostream>#include <string>#include <algorithm>using n…… 题解列表 2022年06月15日 0 点赞 0 评论 664 浏览 评分:0.0
P1002(C++)结构体,自定义排序 摘要:解题思路:定义结构体+结合sort排序+自定义类型排序注意事项:两个获得奖金一致时,按输入顺序输出先输入的参考代码:#include <iostream>#include <algorithm>usi…… 题解列表 2022年06月15日 0 点赞 0 评论 759 浏览 评分:0.0
排队买票(c语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <stdlib.h> /* run this program using the console paus…… 题解列表 2022年06月15日 0 点赞 0 评论 593 浏览 评分:0.0
关于数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string n; cin >> n; in…… 题解列表 2022年06月16日 0 点赞 0 评论 531 浏览 评分:0.0
编写题解 1951: 求平方和 摘要:解题思路:注意事项:参考代码:a = input()b = a.split(" ")c = (int(b[0]) * int(b[0]) + int(b[1]) * int(b[1]))print(c…… 题解列表 2022年06月16日 0 点赞 0 评论 590 浏览 评分:0.0
自定义函数之字符串反转 摘要:参考代码:#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){char ch[100],*p; int i;fgets…… 题解列表 2022年06月16日 0 点赞 0 评论 536 浏览 评分:0.0
编写题解 1018: [编程入门]有规律的数列求和-递归 摘要:解题思路:注意事项:参考代码:n=int(input())f1=1f2=2s=f2/f1for i in range(2,n+1): f1,f2=f2,f1+f2 s=s+f2/f1pri…… 题解列表 2022年06月16日 0 点赞 0 评论 661 浏览 评分:0.0
简单便于理解的逻辑——C语言 摘要:解题思路: 申请一个字符数组,之后用gets接收输入的字符; 撰写函数时输入指针会方便很多,然后写一个循环,不必 题解列表 2022年06月17日 0 点赞 0 评论 561 浏览 评分:0.0
[编程入门]实数的打印 思路:暴力解法,直接输出,输出格式不用管,6.2f意为:数字整体长度包括小数点为6位,保留2位小数,不足则以空格补齐,对齐方式为右对齐。当实际长度大于格式定义的位数时,如12345678.12355798以实际为准,因此输出是12345678.12;所以6,2f看着唬人,实则只要直接按其输出即可。 题解列表 2022年06月17日 0 点赞 0 评论 716 浏览 评分:0.0
计算2的n次方 摘要:解题思路:只是随手一做,有很多不好的地方,请谅解注意事项:注意时间复杂度参考代码:#include<stdio.h>#include<iostream>using namespace std;int …… 题解列表 2022年06月17日 0 点赞 0 评论 612 浏览 评分:0.0