Submit | All submissions | Best solutions | Back to list |
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.
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 |
hide comments
|
|||||
2022-03-26 11:45:26 SangKuan
Be careful not to use file to commit, this caused 3 WAs for me, until I pasted the code directly |
|||||
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. |
|||||
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 |
|||||
2013-09-05 20:55:39 Federico Lebrón
@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. |
|||||
2013-09-05 17:17:18 Mitch Schwartz
@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. |
|||||
2013-09-05 17:03:21 Pranab Kumar
may I know for whch case my code failed ?? IID is 9989148 |
|||||
2012-11-08 11:22:54 Mowji
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 |
|||||
2012-11-08 11:22:54 Paul Draper
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 |
|||||
2012-11-08 11:22:54 Mostafa 36a2
@Bin Jin you've chose languages professionally :) |
|||||
2012-11-08 11:22:54 Mostafa 36a2
This Is An e.g. for the quine codes: http://www.arabteam2000-forum.com/index.php?showtopic=265407&st=60&p=1295920entry1295920 I hope It will Help you |