insidcode
ProblemsDuelLeaderboardStats
Sign In
  1. Home
  2. Problems
  3. Century from Year

Century from Year

Difficulty: Medium

Phase: 1 · Conditional Thinking

XP Reward: 20 XP

Topics: Conditional Thinking, Medium

Supported Languages: Python, JavaScript, C, C++, Java

Problem Description

Take a year (e.g. 1905). Print its century format (e.g. '20th Century' or '19th Century' for 1900). Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).

Constraints

  • -10^9 <= N <= 10^9

Examples

Example 1

Input: 1905

Output: 20th Century

Explanation: Sample execution for input 1905