#SP0000108. Nhiệm vụ hạng S và mật khẩu (An S Ranked Mission)
Bài tập thuộc lộ trình
Mục lục đề ⌄
Nhiệm vụ hạng S và mật khẩu (An S Ranked Mission)
An S Ranked Mission
Source: CodeChef
Version: Phuoc Hung OJ Extended
Problem Statement
For each in the inclusive interval , let be its number of positive divisors. Define and to be the smallest and largest of these divisor counts. Let and be the sums of all numbers attaining these respective counts. For numbers satisfying , let be the sum of their divisor counts and the sum of their values. If the middle group is empty, set .
Define by setting , taking the zero-indexed English alphabet letter at , and writing it uppercase if is even, lowercase otherwise. Concatenate exactly five parts with no spaces: , decimal , , decimal , . Reverse the entire string if is odd; otherwise leave it unchanged.
Input
One line contains integers .
Output
Print exactly one line containing the resulting password.
Subtasks
- Subtask 1 (20 points): ; .
- Subtask 2 (30 points): ; .
- Subtask 3 (50 points): ; .
Examples
Input
2 6
Output
C10d6E
Explanation
For , the divisor counts are . Therefore , , , and . The middle group contains only , so and even . The three letters are C, d, E, giving C10d6E without reversing.