menu ZJOJ
account_circle 请登录
home
首页
book
题目
apps
分类
play_circle_outline
状态
assessment
竞赛
assignment
作业
equalizer
排名
assignment_ind
登录
person_add
注册
1565: 拼数
时间限制:1.000s
内存限制:128MB

题目描述

设有 lns="http://www.w3.org/1998/Math/MathML">n 个正整数 lns="http://www.w3.org/1998/Math/MathML">a_1 \dots a_n,将它们联接成一排,相邻数字首尾相接,组成一个最大的整数。

输入格式

第一行有一个整数,表示数字个数 lns="http://www.w3.org/1998/Math/MathML">n

第二行有 lns="http://www.w3.org/1998/Math/MathML">n 个整数,表示给出的 lns="http://www.w3.org/1998/Math/MathML">n 个整数 lns="http://www.w3.org/1998/Math/MathML">a_i

输出格式

一个正整数,表示最大的整数

样例输入 content_copy

3
13 312 343

样例输出 content_copy

34331213