https://www.acmicpc.net/problem/10950
10950번: A+B - 3
두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.
www.acmicpc.net
1 2 3 4 5 6 | import sys n = int(sys.stdin.readline()) for i in range(n): a, b = map(int, sys.stdin.readline().split(' ')) print(a+b) | cs |
1 2 3 4 5 6 7 8 9 | //'/dev/stdin' var fs = require('fs'); var input = require('fs').readFileSync('예제.txt').toString().split('\n'); for(let i = 1; i<=input[0]; i++){ let number = input[i].split(' '); console.log(parseInt(number[0])+parseInt(number[1])); } | cs |
'알고리즘 공부 > 입출력' 카테고리의 다른 글
백준 10952번 (0) | 2021.09.28 |
---|---|
백준 10951번 (0) | 2021.09.28 |
백준 2558번 (0) | 2021.09.28 |
백준 1000번 (0) | 2021.09.27 |
백준 2557 with jsp (0) | 2021.09.27 |