PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000108. Nhiệm vụ hạng S và mật khẩu (An S Ranked Mission)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

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 xx in the inclusive interval [X,Y][X,Y], let d(x)d(x) be its number of positive divisors. Define CminC_{min} and CmaxC_{max} to be the smallest and largest of these divisor counts. Let SminS_{min} and SmaxS_{max} be the sums of all numbers attaining these respective counts. For numbers satisfying Cmin<d(x)<CmaxC_{min}<d(x)<C_{max}, let CsumC_{sum} be the sum of their divisor counts and SS the sum of their values. If the middle group is empty, set Csum=S=0C_{sum}=S=0.

Define f(z)f(z) by setting j=z mod 26j=z\bmod26, taking the zero-indexed English alphabet letter at jj, and writing it uppercase if jj is even, lowercase otherwise. Concatenate exactly five parts with no spaces: f(Cmin)f(C_{min}), decimal SminS_{min}, f(Csum)f(C_{sum}), decimal SmaxS_{max}, f(Cmax)f(C_{max}). Reverse the entire string if SS is odd; otherwise leave it unchanged.

Input

One line contains integers X,YX,Y.

Output

Print exactly one line containing the resulting password.

Subtasks

  • Subtask 1 (20 points): 1≤X≤Y≤100001\le X\le Y\le 10000; 1≤Y−X+1≤2001\le Y-X+1\le 200.
  • Subtask 2 (30 points): 1≤X≤Y≤1000000001\le X\le Y\le 100000000; 1≤Y−X+1≤100001\le Y-X+1\le 10000.
  • Subtask 3 (50 points): 1≤X≤Y≤10000000000001\le X\le Y\le 1000000000000; 1≤Y−X+1≤5000001\le Y-X+1\le 500000.

Examples

Input

2 6

Output

C10d6E

Explanation

For 2,3,4,5,62,3,4,5,6, the divisor counts are 2,2,3,2,42,2,3,2,4. Therefore Cmin=2C_{min}=2, Smin=2+3+5=10S_{min}=2+3+5=10, Cmax=4C_{max}=4, and Smax=6S_{max}=6. The middle group contains only 44, so Csum=3C_{sum}=3 and even S=4S=4. The three letters are C, d, E, giving C10d6E without reversing.