蓝桥杯2022年第十三届省赛真题-GCD 摘要:解题思路://考察gcd性质,根据更相减损术可以知道一个等式:gcd(a,b)=gcd(a,b-a) 当然这里的前提时a<=b;//所以gcd(a+k,b+k)=gcd(a+k,b-a) 这里的a…… 题解列表 2023年02月20日 0 点赞 0 评论 1906 浏览 评分:9.9
创建vector数组对n进行分配并搜索 摘要:解题思路:空间换时间,使用创建多个vector存储求完数位和的数,从1开始计算,由于同一数位和的数小的一定在前面,所以直接push_back尾部插入. 插入完成后再用循环对vector的…… 题解列表 2023年02月20日 0 点赞 0 评论 393 浏览 评分:0.0
1035: [编程入门]自定义函数之字符类型统计 摘要:```cpp #include #include #include using namespace std; /* 题目描述 编写一函数,由实参传来一个字符串,统计此字符串中字母、数…… 题解列表 2023年02月20日 0 点赞 1 评论 264 浏览 评分:8.7
就是通过分支选择来写 摘要:解题思路:注意事项:“整数”还有一个长边和短边的顺序好像也要调整一下参考代码:def inchjudge1(n): lside=1189 #初始设置边长 rside=841 …… 题解列表 2023年02月20日 0 点赞 0 评论 556 浏览 评分:9.0
1006: [编程入门]三个数找最大值python题解 摘要:运用列表简易找出,还能举一反三print输出时用变量名直接表述参考代码:a=list(map(int,input().split()) print(max(a))…… 题解列表 2023年02月20日 1 点赞 0 评论 697 浏览 评分:8.0
向量点积计算 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,a[1000],b[1000],c[1000]; int i,sum=0; scanf("%d",…… 题解列表 2023年02月20日 0 点赞 0 评论 467 浏览 评分:0.0
年龄与疾病 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,a[100],i; double z=0; double x=0; double c=0; do…… 题解列表 2023年02月20日 0 点赞 0 评论 372 浏览 评分:0.0
题解 2518: 信息学奥赛一本通T1620-质因数分解 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <math.h> int isPrime(int n) { int i, k; k = (i…… 题解列表 2023年02月20日 0 点赞 0 评论 585 浏览 评分:6.0
1033: [编程入门]自定义函数之字符提取 摘要:```cpp #include #include #include using namespace std; /* 题目描述 写一函数,将一个字符串中的元音字母复制到另一个字符串,然后输…… 题解列表 2023年02月20日 0 点赞 1 评论 410 浏览 评分:9.9
题解 2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <math.h> int isPrime(int n) { int i, k; k = (i…… 题解列表 2023年02月20日 1 点赞 1 评论 657 浏览 评分:9.9