All submissions for this problem are available.
The palindrome is a string that can be read the same way from left to right and from right to left. For example, strings "level", "5665" are palindromes, however the string "coder" is not a palindrome.
We define "Lucky String" if it has an even length and the first half of this string is equal to the second half of this string. Like "papa" is an easy string because the first half "pa" is equal to the second half "pa", however the string "adda" is not an easy string because the first half "ad" is not equal to the second half "da".
If you are given N length of palindrome string, what is the maximal possible number of characters/symbols in an "easy string" that can be obtained by removing and changing the order of characters/symbols in the palindrome?
The first line of the sample input contains an integer T - the number of test cases.
Then, T lines follow.
- Each line consists of a single integer N - the length of a palindrome.
- For each test case output a single integer - answer to the problem.
- • 1<=T<=10000
- • 1<=N<=1000000000
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions