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++,
C++14,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Julia,
Kotlin,
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala,
Swift,
Visual Basic

Initializing Code Editor...

{"12d22ce": "/pagelets/recommended-problems/algorithm/sagars-gift-6/", "e7e067d": "/pagelets/suggested-problems/algorithm/sagars-gift-6/", "f35974a": "/pagelets/show-submission/algorithm/sagars-gift-6/", "c34db15": "/pagelets/problem-author-tester/algorithm/sagars-gift-6/", "5ec3e47": "/pagelets/problems-hint/algorithm/sagars-gift-6/"}

realtime.hackerearth.com

80

ad775e7e1e4c929760335526df5600bd5feb7ea3

58a29e5cae2309f04b28

/realtime/pusher/auth/