SOLVE

LATER

Sagar's Gift

Problem

Editorial

Analytics

Today is Sagar's birthday. He got array of numbers as a gift by his father. His father told him that he has another gift if Sagar is able make largest number by concatenating the numbers and swapping the digits of numbers. Help Sagar to make largest number from the given numbers.

**Input:**

First line contains number of testcases T Next line contain value of number of values in array N Followed by N space separated number

**Output:**

Output the answer.

**Constraint :**

1<= T <=10

1<= N <=100

1<= a[i] <= 10000

Time Limit:
1.0 sec(s)
for each input file.

Memory Limit:
256 MB

Source Limit:
1024 KB

Marking Scheme:
Marks are awarded when all the testcases pass.

Allowed Languages:
C,
C++,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala 2.11.8,
Swift,
Visual Basic

Initializing Code Editor...

{"bdcba89": "/pagelets/problems-hint/algorithm/sagars-gift-6/", "bdcba73": "/pagelets/problem-author-tester/algorithm/sagars-gift-6/", "bdcba5a": "/pagelets/suggested-problems/algorithm/sagars-gift-6/", "bdcba9e": "/pagelets/recommended-problems/algorithm/sagars-gift-6/", "bdcba33": "/pagelets/show-submission/algorithm/sagars-gift-6/"}

{}

realtime.hackerearth.com

80

ad775e7e1e4c929760335526df5600bd5feb7ea3

58a29e5cae2309f04b28

/realtime/pusher/auth/