https://www.acmicpc.net/problem/16394

 

16394번: 홍익대학교

입력으로 첫 줄에 특정 년도를 알리는 정수 N이 주어진다. 정수 N은 1,946 부터 1,000,000 사이의 값이다. (1,946 ≤  N ≤  1,000,000)

www.acmicpc.net

#include <iostream>
using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	int N; // 년도
	cin >> N;

	cout << N - 1946;

}

'알고리즘 문제 > C++' 카테고리의 다른 글

[C++] 백준 17256번  (0) 2022.01.24
[C++] 백준 16430번  (0) 2022.01.24
[C++] 백준 15964번  (0) 2022.01.24
백준 15894번  (0) 2022.01.24
백준 15727번  (0) 2022.01.24

+ Recent posts