일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 정규표현식
- array.slice()
- 재귀함수
- Developer_JoyKim
- node.js
- 배열
- 블록체인
- MySQL
- 개발자의 책장
- 최강의 인생
- Where
- 코딩테스트
- Programmers
- join
- 역행자
- Algorithms
- 코드스테이츠
- select
- SQL
- JavaScript
- 코딩공부
- for문
- 개발자_조이킴
- array.push()
- 알고리즘
- array
- Hackerrank
- 프로그래머스
- 코플릿
- 자바스크립트
Archives
- Today
- Total
CodingSpace
[HackerRank/SQL] Alternative Queries - Draw The Triangle 1 본문
Problem. Alternative Queries - Draw The Triangle 1
Link.
https://www.hackerrank.com/challenges/draw-the-triangle-1/problem?isFullScreen=true
Description.
P(R) represents a pattern drawn by Julia in R rows. The following pattern represents P(5):
Write a query to print the pattern P(20).
Key Point.
REPEAT,
information_schema.tables를 사용한 이유:
My Answer.
SET @number := 21;
SELECT REPEAT('* ', @number := @number - 1) FROM information_schema.tables;
References.
문제풀이: https://www.hackerrank.com/challenges/draw-the-triangle-1/forum
information_schema 테이블: https://rk1993.tistory.com/230
'HackerRank' 카테고리의 다른 글
[HackerRank/SQL] Aggregation - Weather Observation Station 16 (0) | 2022.08.01 |
---|---|
[HackerRank/SQL] Basic Select - Revising the Select Query 1 (0) | 2022.04.07 |
Comments