All submissions for this problem are available.
A balanced prime is one which is the average of the previous and the next prime number. Your task in this problem is to write a program that can calculate the nth balanced prime
The first line of input contains t, the number of test cases. This is followed by t lines each containing a number n.
For each test case output the nth balanced prime on a new line.
7 1 2 3 4 5 6 7
5 53 157 173 211 257 263
|Time Limit:||0.173913 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, 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, CLOJ, FS|
Fetching successful submissions