ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

What version of C this Judge recognises?
Posted by Allen Lam 10 Apr 2001 06:03
I'm new to this place. Could someone tell me
why the following code got compile error?

#include <stdio.h>
#include <stdlib.h>

int main(){
  int a, b;
  scanf("%d %d", &a, &b);
  printf("%d\n", a+b);
  return 0;
}
Re: (+)
Posted by Ilya Semenov (NSU) 10 Apr 2001 21:49
> I'm new to this place. Could someone tell me
> why the following code got compile error?
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(){
>   int a, b;
>   scanf("%d %d", &a, &b);
>   printf("%d\n", a+b);
>   return 0;
> }

1. may be you forgotten to put /* @JUDGE_ID: 11573XX 1000 C
*/ at the very first line ? (replace XX with your code)

2. your mailer automatically adds greetings and/or
signature to all outgoing messages, so your message looks
like this:

==============================
Nice to see you, Online Judge!

#include <stdio.h>
int main()
{
.............
}

---
Allen Lam,
Senior Developer,
Chicago, IL 26531
+1(703)287-2397
==============================

that generates errors.
remove greetings, and add //@END_OF_SOURCE_CODE after the
source code.
it works!
Posted by Marat Bakirov 12 Apr 2001 22:01
i have justentered this :
----------------------
#include <stdio.h>
 #include <stdlib.h>

 int main(){
   int a, b;
   scanf("%d %d", &a, &b);
   printf("%d\n", a+b);
   return 0;
 }
------------------------

in web form and got accepted!
Ilya is right, if you use mail, be sure there are no extra
data in your mail.