๊ฐ์ธ๊ณต๋ถ/Algorithm
[๋ฐฑ์ค][Node.js] 1330๋ฒ : ๋ ์ ๋น๊ตํ๊ธฐ
๐๋ฐ๋ด๋ด๐
2021. 6. 22. 22:44
Algorithm
- ๋ ์ ๋น๊ตํ๊ธฐ -
๋ฌธ์
๋ ์ ์ A์ B๊ฐ ์ฃผ์ด์ก์ ๋, A์ B๋ฅผ ๋น๊ตํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
โข A๊ฐ B๋ณด๋ค ํฐ ๊ฒฝ์ฐ์๋ '>'๋ฅผ ์ถ๋ ฅํ๋ค.
โข A๊ฐ B๋ณด๋ค ์์ ๊ฒฝ์ฐ์๋ '<'๋ฅผ ์ถ๋ ฅํ๋ค.
โข A์ B๊ฐ ๊ฐ์ ๊ฒฝ์ฐ์๋ '=='๋ฅผ ์ถ๋ ฅํ๋ค.
์ ์ถ๋ ฅ ์์

๋ฌธ์ ํ๊ธฐ
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();

๋ฐ์ํ