Algorithm
- ๋ ์ ๋น๊ตํ๊ธฐ -
๋ฌธ์
๋ ์ ์ A์ B๊ฐ ์ฃผ์ด์ก์ ๋, A์ B๋ฅผ ๋น๊ตํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
โข A๊ฐ B๋ณด๋ค ํฐ ๊ฒฝ์ฐ์๋ '>'๋ฅผ ์ถ๋ ฅํ๋ค.
โข A๊ฐ B๋ณด๋ค ์์ ๊ฒฝ์ฐ์๋ '<'๋ฅผ ์ถ๋ ฅํ๋ค.
โข A์ B๊ฐ ๊ฐ์ ๊ฒฝ์ฐ์๋ '=='๋ฅผ ์ถ๋ ฅํ๋ค.
์ ์ถ๋ ฅ ์์
![](https://blog.kakaocdn.net/dn/d5ZtVc/btq7CTHPKn8/kkjXiik18AArkmSleg0kRK/img.png)
๋ฌธ์ ํ๊ธฐ
let fs = require("fs"); let input = fs.readFileSync("/dev/stdin").toString().split(" "); let a = parseInt(input[0]); let b = parseInt(input[1]); function solution () { if(a < b) console.log('<'); else if(a > b) console.log('>'); else console.log('=='); } solution();
![](https://blog.kakaocdn.net/dn/bZkAym/btq7CTVihBC/YYXPpQaVGDdkcHN17kaGqk/img.png)
๋ฐ์ํ
'๊ฐ์ธ๊ณต๋ถ > Algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค][Node.js] 1373๋ฒ : 2์ง์ 8์ง์ (0) | 2021.06.24 |
---|---|
[๋ฐฑ์ค][Node.js] 1357๋ฒ : ๋ค์งํ ๋ง์ (0) | 2021.06.23 |
[๋ฐฑ์ค][Node.js] 1292๋ฒ : ์ฝ๊ฒ ํธ๋ ๋ฌธ์ (1) | 2021.06.21 |
[๋ฐฑ์ค][Node.js] 1252๋ฒ : ์ด์ง์ ๋ง์ (0) | 2021.06.20 |
[๋ฐฑ์ค][Node.js] 1316๋ฒ : ๊ทธ๋ฃน ๋จ์ด ์ฒด์ปค (0) | 2021.06.19 |
๋๊ธ