原题链接: https://leetcode.com/problems/unique-paths/ 1. 题目介绍 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to r
1536:【例 2】数星星 Stars 时间限制: 256 ms 内存限制: 65536 KB 【题目描述】 原题来自:Ural 1028 天空中有一些星星,这些星星都在不同的位置,每个星星有个坐标。如果一个星星的左下方(包含正左和正下)有 k 颗星星,就说这颗星星是 k 级的。 例如,上图中星星 5 是
在控制台连续输出五行*,每一行星号数量一次递增 * ** *** **** ***** #1.定义一个行计数器 row = 1 while row <= 5: #定义一个列计数器 col = 1 #开始循环 while col <= row: print('*',end='') col += 1 print('') row += 1