Search found 8 matches

by coolzero
Thu Nov 25, 2004 10:41 am
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 77258

long long int or double :)


Tanks
by coolzero
Wed Nov 24, 2004 11:00 pm
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 77258

10055 - Can't understand why WA

[c]
#include <stdio.h>
#include <stdlib.h>

int main() {

long n1=0, n2=0;

while(scanf("%ld %ld\n", &n1, &n2) == 2)
printf("%ld\n", labs(n2-n1));


return 0;

}
[/c]

Input:
10 12
10 14
100 200
12 10

Output:
2
4
100
2


Can anyone help?

Tanks
by coolzero
Fri Nov 19, 2004 12:54 am
Forum: C
Topic: ...::: sqrt :::...
Replies: 1
Views: 1813

...::: sqrt :::...

Hi.

I'm having problems compiling a program that uses sqrt().

I googled it and I notice that we must use the -lm flag to import the math library...

If I submit a source that need's that flag the judge will accept and use the flag?

If not how can I solve the problem??

Tanks
by coolzero
Mon Nov 15, 2004 8:36 pm
Forum: Volume 104 (10400-10499)
Topic: 10473 - Simple Base Conversion
Replies: 46
Views: 21143

:evil:

I put the semicolon just to see if there was any garbage on the printf's and I forget to take it off!!


Accepted now :)

Tanks
by coolzero
Mon Nov 15, 2004 6:40 pm
Forum: Volume 104 (10400-10499)
Topic: 10473 - Simple Base Conversion
Replies: 46
Views: 21143

ID Date (UTC) Status CPU Memory Author Source Problem / Title
3077610 2004/11/15 16:38:38.860 Wrong Answer 0:00.051 64 53936 C 10473 - Simple Base Conversion
3076771 2004/11/15 09:16:31.100 Wrong Answer 0:00.051 64 53936 C 10473 - Simple Base Conversion
3076766 2004/11/15 09:14:10.539 Wrong ...
by coolzero
Mon Nov 15, 2004 6:37 pm
Forum: Volume 104 (10400-10499)
Topic: 10473 - Simple Base Conversion
Replies: 46
Views: 21143

I'll try again...

Because of me the reputation of country is going down! :(
by coolzero
Mon Nov 15, 2004 11:19 am
Forum: Volume 104 (10400-10499)
Topic: 10473 - Simple Base Conversion
Replies: 46
Views: 21143

HI.

Tanks for replying.

In fact, i haven't notest that problem of the decimal integer :) Tanks

I've tested it but now I got Wrong Answer :(


(...)
if (atoi(line) >= 0) {
if (line[0] == '0' && line[1] == 'x') {
(...)

} while(atoi(line)>=0);
(...)


I think that the judge doesn't like me :cry:
by coolzero
Fri Nov 12, 2004 11:36 am
Forum: Volume 104 (10400-10499)
Topic: 10473 - Simple Base Conversion
Replies: 46
Views: 21143

10473 : Output Limit Exceed

Hi.

I don't have any infinite loops in my code.. I don't understand the error...

Heres my code :


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

int main() {

char line[1000];
char aux[1000];
char *lixo;
int i;

scanf("%s\n",line);
do {

if (atoi(line ...

Go to advanced search