#abc235a. A - Rotate

A - Rotate

Score : 100100 points

问题描述

xyzxyz 表示一个由左至右数字分别为 xxyyzz 的三位数。

给定一个各位数字均不为 00 的三位数 abcabc,求解 abc+bca+cababc + bca + cab 的值。

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

Problem Statement

Let xyzxyz denote the 33-digit integer whose digits are xx, yy, zz from left to right.

Given a 33-digit integer abcabc none of whose digits is 00, find abc+bca+cababc+bca+cab.

Constraints

  • abcabc is a 33-digit integer abcabc none of whose digits is 00.

Input

Input is given from Standard Input in the following format:

abcabc

Output

Print the answer.

Sample Input 1

123

Sample Output 1

666

We have 123+231+312=666123+231+312=666.

Sample Input 2

999

Sample Output 2

2997

We have 999+999+999=2997999+999+999=2997.

update @ 2024/3/10 10:11:07