728x90
반응형
https://www.hackerrank.com/challenges/draw-the-triangle-1/problem?isFullScreen=true
문제
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).
Code
SET @NUMBER = 21;
SELECT REPEAT('* ',@NUMBER := @NUMBER - 1)
FROM INFORMATION_SCHEMA.TABLES
LIMIT 20;
728x90
반응형
'SQL > MySQL' 카테고리의 다른 글
[MySQL/HackerRank] Weather Observation Station 5 (0) | 2023.08.29 |
---|---|
[MySQL/HackerRank] Draw The Triangle 2 (0) | 2023.08.29 |
[MySQL/HackerRank] Weather Observation Station 19 (0) | 2023.08.25 |
[MySQL/HackerRank] Weather Observation Station 18 (0) | 2023.08.25 |
[MySQL/HackerRank] Weather Observation Station 17 (0) | 2023.08.25 |