Hongik University

Interview

Time limit1sMemory limit256 MB

Summary
Read a year N and print how many years have passed since 1946, so output N minus 1946.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Hongik University was founded in 1946.

Given a particular year, print how many years have passed since the university was founded.

Assume that Hongik University is never closed.

Solve the problem in C, C++, JAVA, or Python3.

  1. C

    1. Input

      • Use scanf
      • Use %d for integers, %f for floating-point numbers, %s for strings
      • scanf("%d", &var);
    2. Output

      • Use %d for integers, %f for floating-point numbers, %s for strings
      • Example: printf("%d", var);
    3. Required library: stdio.h

  2. C++

    1. Input

      • Use cin
      • Example: cin >> var;
    2. Output

      • Use cout
      • Example: cout << var;
    3. Required library: iostream

    4. Recommendations

      • using namespace std;
      • ios::sync_with_stdio(false);
      • cin.tie(NULL);
  3. Java

    1. Input

      • Use Scanner
      • Scanner sc = new Scanner(System.in); Integer: sc.nextInt(); Float: sc.nextDouble(); String: sc.nextLine(); or sc.next();
    2. Output

      • System.out.println(var);
    3. Required library: java.util.Scanner

Input

The first line of input gives an integer N, a particular year. N is between 1,946 and 1,000,000. (1,946 ≤ N ≤ 1,000,000)

Output

Print an integer representing the anniversary of Hongik University's founding.

Examples1

  1. Example 1

    Input
    2018
    
    Expected output
    72