题解列表
python语言训练-求PI*
摘要:解题思路: 注意绝对值小于10^-6是某一项的,但是就是正负符号参考代码:pi = 1.0
i = 3.0
c = 1
while True:
if 1 / i < 0.0000……
我看没有人用结构体数组解,那我就写了一个(C语言)
摘要:1)**常规解法**
我真的服了,第一次我是用这个方法,结果只过了50%,说是时间超限,找了半天实在不知道哪有问题,我就想着那就用结构体数组,用空间换时间。结构体数组过了,然后我看题解,发现大家都用……
明明的随机数C++,使用vector函数
摘要:解题思路:利用vector容器设置数组先去重在排序,使用选择排序参考代码:#include<iostream>#include<vector>using namespace std;//选择排序voi……
C语言训练-计算1977!(高精度)
摘要:解题思路:高精度注意事项:数组元素long long参考代码:#include<iostream>
#include<cmath>
#include<string>
using namespac……
津津的储蓄计划(python版)
摘要:解题思路:注意事项:参考代码:def progress(x,y): if x<y: return -1 else: less=x-y return……
C语言训练-舍罕王的失算(高精度)
摘要:解题思路:高精度注意事项:参考代码:#include#include#includeusing namespace std;
const int N = 1e3 + 10;
int a[N], b……
C语言训练-自由落体问题
摘要:解题思路:第一次从100落下, 因此为保持运算一致, 初始距离为-100注意事项:参考代码:#include<iostream>
#include<cmath>
#include<string>
……
船新解法,结构体(c语言)
摘要:```c
#include
#include
typedef struct {
int jishuwei[10],oushuwei[10];
}link;
int haoshu……
C语言训练-自守数问题
摘要:解题思路:字符串注意事项:数位与空格参考代码:#include<iostream>
#include<cmath>
#include<string>
using namespace std;
……