|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
数码排序(lx.pas)
设有n个正整数,将他们连接成一排,组成一个最大的多位整数.例如:n=3时,3个整数13,312,343,连成的最大整数为:34331213。又如:n=4时,4个整数7,13,4,246连接成的最大整数为7424613。
程序输入(lx.in):
共两行:
N
N个数,每个数间空格分开。
程序输出(lx.out):
连接成的多位数
样例:
输入(lx.in)
4
7 13 4 246
输出(lx.out)
7424613 |
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
程序输入(lx.in):
共两行:
N
N个数,每个数间空格分开。
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
程序输出(lx.out):
连接成的多位数 |
|
|
|
|
|
|
|
时间限制 Time Limitation |
|
|
各个测试点1s
|
|
|
|
|
|
|
|
注释 Hint |
|
|
Free Pascal Code:
-------------------
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C++ Code:
-------------------
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
|
|
|
|
|
|
|
|
|
Flag |
|
题号 |
P1111 |
|
贪心 |
通过 |
14人 |
提交 |
58次 |
通过率 |
24% |
难度 |
3 |
|
|
|
|
|
|