Quine multiple times Your task is make program that do following:


You should take number. (Positive, negative, fraction is possible input)
If it is negative, you reverse the quine. and negate that number (Become positive)
Then you repeat &lt;integer part of the input number&gt; times and print first &lt;floor(fraction part of the input number*length)&gt; from your source program. If it is integer, then the fraction part is zero.


-10% bonus if your program isn't palindrome.

Example

If your program is "ABCDEFG", then

1.

5
ABCDEFGABCDEFGABCDEFGABCDEFGABCDEFG


Explanation


  ABCDEFG five times


2.

-2
GFEDCBAGFEDCBA


Explanation


  GFEDCBA (reversed ABCDEFG) 2 times


3.

7.5
ABCDEFGABCDEFGABCDEFGABCDEFGABCDEFGABCDEFGABCDEFGABCDEFGABC


Explanation


  ABCDEFG 7 times followed by ABC (first 3(floor(0.5*7)=floor(3.5)=3) letter on ABCDEFG)


4.

-0.3
GF


Explanation


  GFEDCBA (reversed ABCDEFG) 0 times followed by GF (first 2(floor(0.3*7)=floor(2.1)=2) letter on GFEDCBA(reversed ABCDEFG))


5.

0
&lt;empty&gt;


Explanation:


  &lt;empty&gt; here means that your program doesn't output. It is ABCDEFG zero times that is defined as empty string.
CJam, 28 26 bytes * 0.9 = 23.4

Thanks to Sp3000 for saving 2 bytes.

{`"_~"+rd_z26*,\g1|@%f=}_~


Test it here.

Explanation

{`"_~"+ e# Generalised quine framework. Leaves the source code on the stack.
  rd    e# Read input and parse as double.
  _z    e# Copy and get absolute value.
  26*   e# Multiply by 26, the length of the quine to get length N of the output.
  ,     e# Get a range [0 1 ... floor(N-1)].
  \g    e# Swap with other copy and computer signum to determine direction of string.
  1|    e# This might be zero though, so take bitwise OR with 1 to avoid an error.
  @%    e# Pull up source string. Reverse it if the signum was -1 (no-op otherwise).
  f=    e# The range we pushed earlier corresponds to the (cyclic) indices of the source
        e# which make up the desired result, so we map each index to the corresponding
        e# character to get the final result.
}_~