1024: [编程入门]矩阵对角线求和 摘要:```python l = [] sum_zhu = 0 sum_fu=0 for i in range(3): l1 = list(map(int,input().split())…… 题解列表 2023年12月20日 0 点赞 0 评论 133 浏览 评分:0.0
矩阵对角线求和 C语言 摘要:解题思路:找对角线上数据的i和j的规律注意事项:注意初始化的位置,根据需要判断是否需要放在循环内部;参考代码:#include<stdio.h>int main(){ int a[3][3],i…… 题解列表 2023年12月21日 0 点赞 0 评论 112 浏览 评分:0.0
求一个3×3矩阵对角线元素之和。 输入格式 矩阵 输出格式 主对角线 副对角线 元素和 摘要:解题思路: 找到主对角线 辅对角线 上二维数组下标的关系注意事项:仅供参考 不懂的问参考代码:#include <stdio.h>int main(){ int i,j; int arr…… 题解列表 2023年12月25日 0 点赞 0 评论 126 浏览 评分:0.0
简单方法求解矩阵对角线之和 摘要:解题思路:先利用二维数组拿到用户输入的值,通过观察得知,当i,j值相等时,正好是矩阵的一条对角线,则可通过判断i,j是否相等来累加得到其中一个值,由于第二个对角线无规律,则使用笨方法直接求解即可注意事…… 题解列表 2024年01月18日 0 点赞 0 评论 141 浏览 评分:0.0
矩阵对角线求和 摘要:解题思路:注意事项:参考代码:ls = []for i in range(3): a = list(map(int,input().split())) ls.append(a)i = ls…… 题解列表 2024年03月16日 0 点赞 0 评论 189 浏览 评分:0.0
C++速度功成 摘要:解题思路:数组的构建,数组附值注意事项:注意a[3][3]中的3是容量,而下面默认第一位数组下标为a[0][0],所以输出的时候别写错了,当然要是把i和j定义成1的话,那a[1][1]就是第一行第一列…… 题解列表 2024年03月20日 0 点赞 0 评论 169 浏览 评分:0.0
1024: [编程入门]矩阵对角线求和 摘要:解题思路:注意事项:参考代码:arr = [list(map(int, input().split())) for _ in range(3)] x, y = 0, 0 for i in rang…… 题解列表 2024年04月17日 0 点赞 0 评论 265 浏览 评分:0.0
1024: [编程入门]矩阵对角线求和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e3;ll a…… 题解列表 2024年05月04日 0 点赞 0 评论 126 浏览 评分:0.0
题解 1024: [编程入门]矩阵对角线求和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const ll N=1e3;ll a[…… 题解列表 2024年05月04日 0 点赞 0 评论 127 浏览 评分:0.0
1024 矩阵对角线求和(二维数组赋初值) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[4][4]; for(int i=1;i<=3;i++) { for(int j=1;j<=3;j…… 题解列表 2024年05月12日 0 点赞 0 评论 90 浏览 评分:0.0