102300: [AtCoder]ABC230 A - AtCoder Quiz 3

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

Problem Statement

AtCoder Grand Contest (AGC), a regularly held contest with a world authority, has been held $54$ times.

Just like the $230$-th ABC ― the one you are in now ― is called ABC230, the $N$-th AGC is initially named with a zero-padded $3$-digit number $N$. (The $1$-st AGC is AGC001, the $2$-nd AGC is AGC002, ...)

However, the latest $54$-th AGC is called AGC055, where the number is one greater than $54$. Because AGC042 is canceled and missing due to the social situation, the $42$-th and subsequent contests are assigned numbers that are one greater than the numbers of contests held. (See also the explanations at Sample Inputs and Outputs.)

Here is the problem: given an integer $N$, print the name of the $N$-th AGC in the format AGCXXX, where XXX is the zero-padded $3$-digit number.

Constraints

  • $1 \leq N \leq 54$
  • $N$ is an integer.

Input

Input is given from Standard Input in the following format:

$N$

Output

Print the name of the $N$-th AGC in the specified format.


Sample Input 1

42

Sample Output 1

AGC043

As explained in Problem Statement, the $42$-th and subsequent AGCs are assigned numbers that are one greater than the numbers of contests.
Thus, the $42$-th AGC is named AGC043.


Sample Input 2

19

Sample Output 2

AGC019

The $41$-th and preceding AGCs are assigned numbers that are equal to the numbers of contests.
Thus, the answer is AGC019.


Sample Input 3

1

Sample Output 3

AGC001

As mentioned in Problem Statement, the $1$-st AGC is named AGC001.
Be sure to pad the number with zeros into a $3$-digit number.


Sample Input 4

50

Sample Output 4

AGC051

Input

题意翻译

AGC 比赛至今已举办了 $54$ 次,每次的比赛编号形如 AGC001 , AGC002 , AGC003 等。但 AGC042 号比赛由于特殊情况没有举办,所以第 $42$ 场 AGC 比赛的编号就变成了 AGC043 。在这之后,第 $n$ 场比赛的编号的后三位组成的三位数就比原来大了 $1$ 。现在输入 $n$ ,请你编程输出第 $n$ 场比赛的编号。

Output

分数:100分

问题描述

AtCoder Grand Contest(AGC)是一个具有世界权威的定期竞赛,已经举行了54次。

就像你现在所在的第230次ABC被称为ABC230,第N次AGC最初是以一个用零填充的3位数N命名的。(第1次AGC是AGC001,第2次AGC是AGC002,...)

然而,最新的第54次AGC被称为AGC055,其中数字比54大1。由于社会情况,AGC042被取消并缺失,第42次及以后的比赛被分配比举行的比赛数量大1的数字。 (参见示例输入和输出中的解释。)

问题是:给定一个整数N,以AGCXXX的格式打印第N次AGC的名称,其中XXX是用零填充的3位数。

约束

  • 1≤N≤54
  • N是一个整数。

输入

输入从标准输入给出以下格式:

$N$

输出

以指定格式打印第N次AGC的名称。


样例输入1

42

样例输出1

AGC043

如问题描述中所述,第42次及以后的AGC被分配比比赛数量大1的数字。
因此,第42次AGC被称为AGC043


样例输入2

19

样例输出2

AGC019

第41次及以前的AGC被分配等于比赛数量的数字。
因此,答案是AGC019


样例输入3

1

样例输出3

AGC001

如问题描述中所述,第1次AGC被称为AGC001
确保将数字用零填充为3位数。


样例输入4

50

样例输出4

AGC051

加入题单

上一题 下一题 算法标签: