Skip to content

Commit

Permalink
#12 22.06.04 > 직사각형 별찍기_다른사람 풀이
Browse files Browse the repository at this point in the history
  • Loading branch information
beurmuz committed Jun 4, 2022
1 parent 5cced77 commit 4dcc146
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/programmers/Lv_1/starRectangle.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// 내가 푼 풀이
process.stdin.setEncoding('utf8');
process.stdin.on('data', data => {
const n = data.split(' ');
Expand All @@ -9,4 +10,16 @@ process.stdin.on('data', data => {
}
console.log(answer);
}
});

// 다른사람 풀이 (repeat 함수이용)
process.stdin.setEncoding('utf8');
process.stdin.on('data', data => {
const n = data.split(" ");
const a = Number(n[0]), b = Number(n[1]);
const row = '*'.repeat(a)
for(let i =0; i < b; i++){
console.log(row)
}

});

0 comments on commit 4dcc146

Please sign in to comment.