Pascal 杨辉三角
用于打印杨辉三角的程序,有多种算法仅提供一种
PRogram yh (input,ouput);
var
m,n,c:integer;
Begin
For m:=0 TO 10 Do
Begin
c:=1;
write(c:40-3*m);
For n:=1 To m Do
begin
c:=c+(m-n+1) Div n;
write(c:6)
End;
writeln
End;
readln
End.
Pascal 杨辉三角的更多相关文章
- [LeetCode] Pascal's Triangle II 杨辉三角之二
Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3, ...
- [LeetCode] Pascal's Triangle 杨辉三角
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Retur ...
- LeetCode 118. Pascal's Triangle (杨辉三角)
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Retur ...
- [Swift]LeetCode118. 杨辉三角 | Pascal's Triangle
Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's t ...
- [Swift]LeetCode119. 杨辉三角 II | Pascal's Triangle II
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...
- [leetcode-118]Pascal's triangle 杨辉三角
Pascal's triangle (1过) Given numRows, generate the first numRows of Pascal's triangle. For example, ...
- Leetcode#118. Pascal's Triangle(杨辉三角)
题目描述 给定一个非负整数 numRows,生成杨辉三角的前 numRows 行. 在杨辉三角中,每个数是它左上方和右上方的数的和. 示例: 输入: 5 输出: [ [1], [1,1], [1,2, ...
- Pascal's Triangle leetcode java(杨辉三角)
题目: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, ...
- [LeetCode] 119. Pascal's Triangle II 杨辉三角之二
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...
随机推荐
- TP5.1:facade静态代理
THINKPHP中有很多很多的facade静态代理,这些静态代理的位置在:thinkphp\think\facade文件夹下 1.在app\commom中新建一个文件,名为:Test.php,表示被代 ...
- Windows 静态IP脚本
@echo off echo 快速设置IP地址和DNS为“静态” set 连接名称=以太网 set ip地址=192.168.1.80 set 子网掩码=255.255.255.0 set 网关地址= ...
- Altium_Designer-原理图库如何添加低电平有效的管脚?
在编辑元件原理图符号时,在display name选项中将要加低电平的字符后面都加上“\”即可,如图:
- 好的学习网站和app推荐
1 W3cschool: http://www.w3school.com.cn/ 菜鸟教程: http://www.runoob.com/ 2 视频学习网站和app:网易云课堂.腾讯课堂.慕课网(h ...
- IOS instancetype的使用好处
instancetype的类型表示上,跟id一样,可以表示任何对象类型 instancetype只能用在返回值类型上,不能像 id 一样用在参数类型上 instancetype 比 id 多一个好处 ...
- 有权并查集,Poj(1988)
题目链接:http://poj.org/problem?id=1988 题目大意: 有n个从1到n编号的箱子,将每个箱子当做一个栈,对这些箱子进行p次操作,每次操作分别为以下两种之一: 输入 M x ...
- SSH连接linux时,长时间不操作就断开的解决方案(增强版)
1.第一次尝试失败 修改/etc/ssh/sshd_config文件, 找到 ClientAliveInterval 0 ClientAliveCountMax 3 并将注释符号("#&qu ...
- 吴裕雄 python 机器学习——支持向量机非线性回归SVR模型
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets, linear_model,svm fr ...
- PASCAL VOC数据集分析
http://blog.csdn.net/zhangjunbob/article/details/52769381
- 【洛谷P1948】[USACO08JAN]电话线
电话线 题目链接:https://www.luogu.org/problemnew/show/P1948 二分答案+最短路 我们要求一条1~n的路径,使其中的第k+1大的数最小. 二分第k+1大的数的 ...