矩阵对角求和 解题思路:1.首先,声明变量i、j、n、sum1和sum2,它们分别用于控制循环和保存对角线和的结果。2.通过scanf函数读取用户输入的n,该值表示二维数组的行和列的数量。3.创建一个大小为n×n的二维数组arr。4.使用嵌套的for循环, 题解列表 2023年11月09日 0 点赞 0 评论 710 浏览 评分:0.0
最后两个测试例 都比较坑,需要特判,附带样例 摘要:import pprint r,c=map(int,input().split()) b=[] for x in range(c): b.append(list(input())) …… 题解列表 2023年11月09日 0 点赞 0 评论 522 浏览 评分:0.0
随便写一下,纪念一下回归 摘要:解题思路: 这个题讲一个通俗的思路,首先由于数据巨大,最大的一个问题就是超时,所以必然不能使用传统的思路,这里可以理解为,我们从最小的质数来分数据,(定理一定可以拆分成多个质数的乘积)在这个质数上将数…… 题解列表 2023年11月09日 0 点赞 0 评论 821 浏览 评分:0.0
(大整数减法)C语言思路简单,易懂!!! 理解万岁 超级好理解 &_& 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <string.h>void change(char n[],int m){ //将数字字符逆序 int i…… 题解列表 2023年11月09日 0 点赞 0 评论 757 浏览 评分:0.0
循环控制,汽水瓶 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int test1(int n) { return n / 3;}int test2(int n) { retu…… 题解列表 2023年11月10日 0 点赞 0 评论 564 浏览 评分:0.0
自定义函数求一元二次方程 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <math.h> #include <complex.h> // 计算并输出实数根的函数 void r…… 题解列表 2023年11月10日 0 点赞 0 评论 660 浏览 评分:0.0
题解 3077: 信息学奥赛一本通T1332-周末舞会 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,d=0,e=0; cin>>a>>b>>…… 题解列表 2023年11月10日 0 点赞 0 评论 767 浏览 评分:0.0
c代码记录之宏定义找最大数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #define MAX(a,b,c) (a>b?a:b)>c?(a>b?a:b):c //#define MAX(a,b,c) …… 题解列表 2023年11月10日 0 点赞 0 评论 608 浏览 评分:0.0
题解 2814: 正常血压 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,d=0,e=0,res=0; cin>>…… 题解列表 2023年11月10日 0 点赞 0 评论 524 浏览 评分:0.0
题解 2816: 统计满足条件的4位数个数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c=0; cin>>a; for(int i…… 题解列表 2023年11月10日 0 点赞 0 评论 618 浏览 评分:0.0