HelloMinchan
처음처럼
HelloMinchan
LinkedIn
전체 방문자
오늘
어제
  • 분류 전체보기 (306)
    • Backend (4)
      • NestJS (1)
      • Express (1)
      • Spring (2)
    • Infrastructure (1)
      • AWS (1)
    • Frontend (1)
      • Next.js (1)
    • Language & Runtime (4)
      • Java (2)
      • Node.js (2)
    • Computer Science (8)
      • Computer Networks (3)
      • Operating Systems (4)
      • OOP (1)
    • 독서 (4)
      • 데이터 중심 애플리케이션 설계 (3)
      • 객체지향의 사실과 오해 (1)
    • 회고 (4)
      • Project (2)
      • Career (2)
    • Deprecated (280)

채널

  • GitHub
  • LinkedIn

최근 글

태그

  • 백준
  • 프로그래머스
  • 백준Python
  • Database
  • 프로그래머스C++
  • front-end
  • 개발자
  • 백준Go
  • Algospot
  • 프로그래밍
  • 알고스팟
  • 백엔드
  • back-end
  • programmers
  • 프로그래머스Python
  • Baekjoon Online Judge
  • 백준C++
  • 데이터베이스
  • 알고스팟Python
  • 코딩

최근 댓글

인기 글

hELLO
HelloMinchan

처음처럼

[Baekjoon Online Judge] 백준 10950번 A+B - 3(Go)
Deprecated

[Baekjoon Online Judge] 백준 10950번 A+B - 3(Go)

2020. 2. 28. 00:43

© 2020 All Rights Reserved. 주식회사 스타트링크

[Baekjoon Online Judge] 백준 10950번 A+B - 3

(Go)

(글쓴날 : 2020.02.28)

 


* Baekjoon Online Judge, 백준 10950번 문제 Go 언어 풀이입니다.

* 소스 코드의 저작권은 글쓴이에게 있습니다.


 

 

백준 10950번 A+B - 3


1) 문제

문제 링크 : https://www.acmicpc.net/problem/10950

 

10950번: A+B - 3

두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.

www.acmicpc.net


2) 풀이 과정

무난한 두 정수의 합을 구하는 문제입니다.

다만, 첫 번째 입력으로 반복 제어 횟수가 들어오므로 따로 변수에 저장해 주시면 됩니다.

그 후, 변수에 저장된 횟수만큼 반복문을 돌려 두 정수를 입력받고 더한 값을 한 줄씩 출력해 주시면 되겠습니다.


3) 코드

 

* Go 코드

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main
 
import "fmt"
 
func main() {
    var (
        t int
        a int
        b int
    )
 
    fmt.Scan(&t)
 
    for i := 0; i < t; i++ {
        fmt.Scan(&a, &b)
        fmt.Println(a+b)
    }
}

 

저작자표시 비영리 변경금지 (새창열림)

'Deprecated' 카테고리의 다른 글

[Baekjoon Online Judge] 백준 15552번 빠른 A+B(Python)  (0) 2020.02.28
[Baekjoon Online Judge] 백준 8393번 합(Python)  (0) 2020.02.28
[Baekjoon Online Judge] 백준 2739번 구구단(Python, Go)  (0) 2020.02.28
[Baekjoon Online Judge] 백준 10817번 세 수(Python)  (0) 2020.02.28
[Baekjoon Online Judge] 백준 2753번 윤년(Go)  (0) 2020.02.27
    'Deprecated' 카테고리의 다른 글
    • [Baekjoon Online Judge] 백준 15552번 빠른 A+B(Python)
    • [Baekjoon Online Judge] 백준 8393번 합(Python)
    • [Baekjoon Online Judge] 백준 2739번 구구단(Python, Go)
    • [Baekjoon Online Judge] 백준 10817번 세 수(Python)
    HelloMinchan
    HelloMinchan
    Though you should not fear failure, You should do your very best to avoid it.

    티스토리툴바