Skip to content

Instantly share code, notes, and snippets.

@zyf0330
zyf0330 / fillTriangle
Last active April 16, 2024 05:57
给定直角边长,从左上角以逆时针螺旋路径,填充该等腰三角形内的每个整数坐标点
function fillTriangle(N) {
const lines = [];
function makeRound() {
let x = round - 1;
let y = round - 1;
let step = 1;
try {
(lines[y] ??= [])[x] = n;
canFinishFill();
--- TLP 1.5.0 --------------------------------------------
+++ Configured Settings:
defaults.conf L0004: TLP_ENABLE="1"
defaults.conf L0005: TLP_WARN_LEVEL="3"
defaults.conf L0006: TLP_PERSISTENT_DEFAULT="0"
defaults.conf L0007: DISK_IDLE_SECS_ON_AC="0"
defaults.conf L0008: DISK_IDLE_SECS_ON_BAT="2"
defaults.conf L0009: MAX_LOST_WORK_SECS_ON_AC="15"
defaults.conf L0010: MAX_LOST_WORK_SECS_ON_BAT="60"