杨辉三角-题解(C++代码) 摘要:解题思路: 思路很一般,利用二位数组来存储三角阵。利用两个嵌套的for循环就可以将整个三角阵输入到二位数组中,在二维数组的逐层输入的过程中。先判断本层数组的首尾,给本层数组的首尾都赋值为1,然后再对…… 题解列表 2019年07月27日 0 点赞 0 评论 1457 浏览 评分:6.0
1231: 杨辉三角 摘要:```cpp #include using namespace std; int main() { int n,a[30][30]; while(cin>>n) …… 题解列表 2023年01月13日 0 点赞 0 评论 327 浏览 评分:6.0
1231: 杨辉三角 摘要:``` #include using namespace std; const int N=110; int a[N][N]; int main(){ int n; while(cin…… 题解列表 2023年12月22日 0 点赞 0 评论 312 浏览 评分:2.0
最直观的解法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { int n; // 多组输入…… 题解列表 2026年01月11日 0 点赞 0 评论 115 浏览 评分:0.0
1231: 杨辉三角 简洁 可读性高 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>usingnamespacestd;in…… 题解列表 2025年09月22日 0 点赞 0 评论 471 浏览 评分:0.0
1231基础解法(Python) 摘要:解题思路:没啥思路注意事项:注意print()才是空一行,print('\n')是空两行参考代码:lst_rec = list(map(int, input().split()))fo…… 题解列表 2022年12月26日 0 点赞 0 评论 304 浏览 评分:0.0
编写题解 1231: 杨辉三角 摘要:解题思路:注意事项:参考代码:#include "stdio.h" int main() { int n, i, j; int a[30][30]; while (scanf("%…… 题解列表 2023年01月23日 0 点赞 0 评论 266 浏览 评分:0.0
杨辉三角解题 摘要:解题思路:注意事项:参考代码:while True: try: def tri(row): List = [[1 for i in range(j)] for…… 题解列表 2023年02月13日 0 点赞 0 评论 314 浏览 评分:0.0
一维数组的解法 摘要:```cpp#includeusing namespace std;int main(){ int a; while(cin >> a) { …… 题解列表 2025年08月19日 0 点赞 0 评论 189 浏览 评分:0.0
杨辉三角(Java) 摘要:解题思路:注意事项:参考代码:package arrLast; //题目 1231: 杨辉三角 import java.util.Scanner; public class t_1231 { …… 题解列表 2024年02月01日 0 点赞 0 评论 303 浏览 评分:0.0