#abc320a. A - Leyland Number

A - Leyland Number

Score : 100100 points

问题描述

给定两个正整数 AABB

输出 AB+BAA^B + B^A 的值。

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

Problem Statement

You are given positive integers AA and BB. Print the value AB+BAA^B+B^A.

Constraints

  • 2AB92 \leq A \leq B \leq 9
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

AA BB

Output

Print the answer as an integer.

Sample Input 1

2 8

Sample Output 1

320

For A=2,B=8A = 2, B = 8, we have AB=256,BA=64A^B = 256, B^A = 64, so AB+BA=320A^B + B^A = 320.

Sample Input 2

9 9

Sample Output 2

774840978

Sample Input 3

5 6

Sample Output 3

23401

update @ 2024/3/10 01:38:09

}