SUCCESS - Success

Print Success.

Comment

You won't have the shortest code if You just print "Success". Look for some tricks.

No Input

Output

Success


Added by:Piotr Kąkol
Date:2010-03-13
Time limit:0.400s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C
Resource:SUCCESS

hide comments
2010-05-30 12:58:10 Zoltán Zámbori
Thank You! I tried the -ansi and -std=c89 compiler switch*, but i still get exit code 0 at home when i run: 'main(){perror(!dup2(1,2));}'

*= gcc-4.3 -std=c89 -ansi -s -pipe -O2 -lm -fomit-frame-pointer main.c -o main

Last edit: 2010-05-30 13:27:48
2010-05-30 11:44:51 Balazs Kezes
@Zoltán Zámbori: Make sure you test at home as C89 (for example: -ansi), because C99 standard says the following: "reaching the } that terminates the main function returns a value of 0"
2010-05-24 11:35:50 Zoltán Zámbori
NZEC, but i don't know why:

main(){perror(!dup2(1,2));}

At home the exit code is: 0
2010-05-15 08:36:56 Zoltán Zámbori
The judge system is wrong. At home my codes print "Success" and the exit codes are 0, but here the judge give NZEC or WA. Very frustrating :-(((

Last edit: 2010-05-24 11:43:19
2010-03-29 14:22:30 Piotr KÄ…kol
@Zoltán Zámbori - Maybe You will find it with Google, but I doubt because there were only 3 sites where this trick was just mentioned. But I found them when I paste that trick to Google, so it would be much more difficult to find it not knowing it.
Nevertheless, good luck (if You still want to find it). ;-)
2010-03-28 01:45:15 :(){ :|: & };:

Well,both (i) & (iii) trick will result to the same number of bytes,I tested both in one of my solution,(iii) also fails where (i) fail.
2010-03-27 23:57:30 Zoltán Zámbori
'here was method I' is accepted by the judge, but
'here was method II' get NZEC, and
'here was method III' is accepted.

Now what is the preferred method to find the "simple trick"?

edit by kokosek - I removed codes

Last edit: 2010-03-29 20:51:23
2010-03-27 23:07:32 :(){ :|: & };:
Probably Piotr meant 'there was a code here'

Although it's a bodge and doesn't like to work for every NZEC.

edit by kokosek - I removed the code

Last edit: 2010-03-29 21:03:11
2010-03-27 22:41:43 Zoltán Zámbori
It returns 8 on my Ubuntu. We are not playing on the same field ...

I send "main(){!puts("Success");}", i get an NZEC.

The role of the NZEC is to catch interpreter errors. But i send C code ...
2010-03-26 20:14:31 Piotr KÄ…kol
Your code get NZEC because puts is always true so it returns 1 not 0. You can add '!' in front of puts and You will get AC.
I don't know how to test NZEC at home, but I will write to SPOJ team and on spoj.pl/forum and maybe they will enlighten us.

Last edit: 2010-03-27 07:22:32
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.