102350: [AtCoder]ABC235 A - Rotate

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

Problem Statement

Let $xyz$ denote the $3$-digit integer whose digits are $x$, $y$, $z$ from left to right.

Given a $3$-digit integer $abc$ none of whose digits is $0$, find $abc+bca+cab$.

Constraints

  • $abc$ is a $3$-digit integer $abc$ none of whose digits is $0$.

Input

Input is given from Standard Input in the following format:

$abc$

Output

Print the answer.


Sample Input 1

123

Sample Output 1

666

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


Sample Input 2

999

Sample Output 2

2997

We have $999+999+999=2997$.

Input

题意翻译

给定一个三位数,它的百位是 $a$ ,十位是 $b$ ,个位是 $c$ ,可以表示为 $abc$(保证三位数的每一位都不为 $0$ )。求出 $abc+bca+cab$ 的和。

Output

分数:100分

问题描述

令$xyz$表示一个三位数,其从左到右的数字分别为$x$、$y$、$z$。

给定一个三位数$abc$,其没有一个数字为0,找出$abc+bca+cab$。

约束条件

  • $abc$是一个三位数$abc$,其没有一个数字为0。

输入

从标准输入以以下格式获取输入:

$abc$

输出

打印答案。


样例输入1

123

样例输出1

666

我们有$123+231+312=666$。


样例输入2

999

样例输出2

2997

我们有$999+999+999=2997$。

加入题单

算法标签: