SELF - Super Quine
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.
|
|
dranzerashi:
2015-06-28 16:33:35
My code accepted all the testcases it showed but ended with a run time error SIGSEGV
|
|
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 ??
|
|
Mowji:
2012-11-08 11:22:54
Do we need to consider reverse of 'new line' characters?
|
|
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.
|
|
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:
|
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 |