A - ABD Editorial /

Time Limit: 2 sec / Memory Limit: 256 MB

配点 : 100100

問題文

AtCoder Beginner Contestが始まってから早数十年。

コンテストは 11 回目から順に ABC001,ABC002,...... と名付けられてきましたが、 999999 回目のコンテスト ABC999 を終え、これからのコンテストの名前をどうするかという問題が生じました。

そこで、10001000 回目から 19981998 回目のコンテストを順に ABD001,ABD002,......,ABD999 と名付けることとなりました。

11 以上 19981998 以下の整数 NN が与えられるので、NN 回目のコンテストの名前の最初の 33 文字を出力してください。

制約

  • 1N19981 \leq N \leq 1998
  • NN は整数

入力

入力は以下の形式で標準入力から与えられる。

NN

出力

NN 回目のコンテストの名前の最初の 33 文字を出力せよ。


入力例 1Copy

Copy
999

出力例 1Copy

Copy
ABC

999999 回目のコンテストの名前は ABC999 です。


入力例 2Copy

Copy
1000

出力例 2Copy

Copy
ABD

10001000 回目のコンテストの名前は ABD001 です。


入力例 3Copy

Copy
1481

出力例 3Copy

Copy
ABD

14811481 回目のコンテストの名前は ABD482 です。

Score : 100100 points

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 1Copy

Copy
999

Sample Output 1Copy

Copy
ABC

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


Sample Input 2Copy

Copy
1000

Sample Output 2Copy

Copy
ABD

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


Sample Input 3Copy

Copy
1481

Sample Output 3Copy

Copy
ABD

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



2025-04-05 (Sat)
22:59:50 +00:00