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
SangKuan: 2022-03-26 11:45:26

Be careful not to use file to commit, this caused 3 WAs for me, until I pasted the code directly

lastwish42: 2015-06-30 08:24:56

Got WA. It says "YOUR ANSWER ISN'T 1 TIMES AS LONG AS YOUR CODE" for the test case with n=1.
Ran it separately on **ideone**, even measured the length of ip & op, they are same.

dranzerashi: 2015-06-28 16:33:35

My code accepted all the testcases it showed but ended with a run time error SIGSEGV
my submission id Source code 14557399
plss tell why ive been working on this all day

Federico Lebrón: 2013-09-05 20:55:39

@draperp: This is likely too late, but no, in C a return 0; in main is not implicit. In C++ it is. In C, not returning explicitly is undefined behavior, and usually returns some random value that was in the eax register.

Mitch Schwartz: 2013-09-05 17:17:18

@Pranab Kumar: This problem has a special judge. Click on "wrong answer" in the result column to see more info about how your code fails.

Pranab Kumar: 2013-09-05 17:03:21

may I know for whch case my code failed ??
IID is 9989148

Mowji: 2012-11-08 11:22:54

Do we need to consider reverse of 'new line' characters?
What is the reverse for the following code?
#include<stdio.h>
int main(){return 0;}

Last edit: 2012-11-07 22:05:47
Paul Draper: 2012-11-08 11:22:54

My C program inexplicably has a runtime error. I have tested it on all 21 possible cases, and it works fine.
EDIT: I added return 0; and it worked. But I thought that was implicit?

Last edit: 2012-11-07 16:37:59
Mostafa 36a2: 2012-11-08 11:22:54

@Bin Jin you've chose languages professionally :)

Mostafa 36a2: 2012-11-08 11:22:54

This Is An e.g. for the quine codes:
http://www.arabteam2000-forum.com/index.php?showtopic=265407&st=60&p=1295920&#entry1295920
I hope It will Help you


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