跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F2898. Mysterious numbers - 2

  • ID: 2904
  • 传统题
  • 2000ms
  • 256MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:进阶
  • 上传者:
  • 待分类
  • 整理状态
  • 进阶
  • 难度
  • 共享题库
  • Codeforces
  • 英文题面
  • 题目来源
  • 题面语言

Mysterious numbers - 2

题目描述

G. Mysterious numbers - 2
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Input

The only line of input contains three integers a1,a2,a3 (1≤a1,a2,a3≤20), separated by spaces.

Output

Output a single integer.

Examples
Input
2 3 2
Output
5
Input
13 14 1
Output
14
Input
14 5 9
Output
464
Input
17 18 3
Output
53

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 2569 题。保留原作者与原赛事署名。