๐Ÿ’  Cpp/[BOJ] ๋‹จ๊ณ„๋ณ„๋กœ ํ’€์–ด๋ณด๊ธฐ

[๋ฐฑ์ค€][C++/C์–ธ์–ด] 8393๋ฒˆ : ํ•ฉ

์„ ๋‹ฌ 2021. 2. 5. 02:28
๋ฐ˜์‘ํ˜•

๋ฌธ์ œ
n์ด ์ฃผ์–ด์กŒ์„ ๋•Œ, 1๋ถ€ํ„ฐ n๊นŒ์ง€ ํ•ฉ์„ ๊ตฌํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค.


์ž…๋ ฅ
์ฒซ์งธ ์ค„์— n (1 โ‰ค n โ‰ค 10,000)์ด ์ฃผ์–ด์ง„๋‹ค.


์ถœ๋ ฅ
1๋ถ€ํ„ฐ n๊นŒ์ง€ ํ•ฉ์„ ์ถœ๋ ฅํ•œ๋‹ค.


ํ’€์ด

#include <stdio.h>
int main(){
    int i,a,b,n;
    scanf("%d",&n);
    for(i=1;i<=n;){
        scanf("%d %d",&a,&b);
        printf("%d\n",a+b);
        i++;
    }
    return 0;
}
๋ฐ˜์‘ํ˜•