#abc257a. A - A to Z String 2

A - A to Z String 2

Score : 100100 points

问题描述

找出以下字符串拼接得到的字符串从开头算起的第 XX 个字符:按顺序依次拼接 NNANNB,……以及 NNZ

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

Problem Statement

Find the XX-th character from the beginning of the string that is obtained by concatenating these characters: NN copies of A's, NN copies of B's, …, and NN copies of Z's, in this order.

Constraints

  • 1N1001 \leq N \leq 100
  • 1XN×261 \leq X \leq N\times 26
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN XX

Output

Print the answer.

Sample Input 1

1 3

Sample Output 1

C

We obtain the string ABCDEFGHIJKLMNOPQRSTUVWXYZ, whose 33-rd character from the beginning is C.

Sample Input 2

2 12

Sample Output 2

F

We obtain the string AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ, whose 1212-th character from the beginning is F.

update @ 2024/3/10 10:54:43