SELF - Super Quine

no tags 

Write A program to print itself n(-10 <= n <= 10) times.

Negative count means the reversed program.

Input

A line contains an integer n.

Output

The required string described above.

Score

Score is the length of your code.

Example

Input:
-2

Source:
abcdefg

Output:
gfedcbagfedcba

Score:
7

Hint:
You can contact me if you have any question about the Special Judge or your code.


hide comments
Aditya Pande: 2012-11-08 11:22:54

what is wrong with submission ID 7088685 2012-06-04 13:42:27.

it gets WA on running judge (7) something.....
plz help

Last edit: 2012-06-04 12:08:34
smiley007: 2012-11-08 11:22:54

from where do i get the source?? from a file or i have to assume it anything...

Paras Sharma: 2012-11-08 11:22:54

Finally got AC :-)

Mike: 2012-11-08 11:22:54

We have to reverse our own source code or we have to get an input and then do it... Plz help...

RE(debanjan) You have to reverse your source code.

Last edit: 2011-04-10 19:56:20
Marwan : 2012-11-08 11:22:54

what is this , i keep getting runtime error (SIGSEGV)
why is that ,
i usef fopen to open my submitted code and read it, then print it n times.
is that wrong idea ?

edit : file reading not allowed.

Last edit: 2012-12-29 16:17:56
~Dharm~: 2012-11-08 11:22:54

why i am getting WA???
my ans ID is 4675545
pls help me...

Ramachandran: 2012-11-08 11:22:54

My program is running correctly for any input from -10 to 10. Also gets accepted for 5 of the inputs, but throws a segmentation fault error and gets rejected.
Is there something wrong with the executing environment ?
edit : Had to implement my own print function and it worked. Weird !

Last edit: 2011-02-11 00:27:27
Piotr KÄ…kol: 2012-11-08 11:22:54

No. Input is a number and this "abcdefg" is a sample of Your source on which You should operate.
So for example You have a program:
main(){return 0;}
And You for n=-1 You should print:
};0 nruter{)(niam

Last edit: 2010-06-01 07:45:19
pantop: 2012-11-08 11:22:54

DO we have to take string as input or it is always "abcdefg"???


Added by:Bin Jin
Date:2008-10-03
Time limit:1s
Source limit:10240B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C CSHARP C++ 4.3.2 CPP C99 D FSHARP GO HASK JAVA OCAML PAS-GPC PAS-FPC SCALA
Resource:Wu Zhuojie