#abc099a. A - ABD

A - ABD

Score : 100100 points

问题描述

自 AtCoder Beginner Contest 开始以来,已经过去了数十年。

这些比赛按照从第一轮开始的顺序被标记为 ABC001ABC002...... 等,但在第 999999ABC999 后,出现了一个问题:后续的比赛应该如何进行标记?

最终,决定从第 10001000 轮到第 19981998 轮的比赛标签为:ABD001ABD002......ABD999

给你一个整数 NN,范围在 1119981998(包含两端点)。请你输出第 NN 轮 AtCoder Beginner Contest 的标签的前三个字符。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Decades have passed since the beginning of AtCoder Beginner Contest.

The contests are labeled as ABC001, ABC002, ...... from the first round, but after the 999999-th round ABC999, a problem occurred: how the future rounds should be labeled?

In the end, the labels for the rounds from the 10001000-th to the 19981998-th are decided: ABD001, ABD002, ......, ABD999.

You are given an integer NN between 11 and 19981998 (inclusive). Print the first three characters of the label of the NN-th round of AtCoder Beginner Contest.

Constraints

  • 1N19981 \leq N \leq 1998
  • NN is an integer.

Input

Input is given from Standard Input in the following format:

NN

Output

Print the first three characters of the label of the NN-th round of AtCoder Beginner Contest.

Sample Input 1

999

Sample Output 1

ABC

The 999999-th round of AtCoder Beginner Contest is labeled as ABC999.

Sample Input 2

1000

Sample Output 2

ABD

The 10001000-th round of AtCoder Beginner Contest is labeled as ABD001.

Sample Input 3

1481

Sample Output 3

ABD

The 14811481-th round of AtCoder Beginner Contest is labeled as ABD482.

update @ 2024/3/10 17:18:45