Search found 5 matches

by Pedro
Fri May 15, 2009 1:24 pm
Forum: Volume 100 (10000-10099)
Topic: 10090 - Marbles
Replies: 43
Views: 28197

Re: 10090 - Marbles

up
by Pedro
Thu May 14, 2009 5:28 am
Forum: Volume 100 (10000-10099)
Topic: 10090 - Marbles
Replies: 43
Views: 28197

Re: 10090 - Marbles

Can anyone tell me why the answer is wrong?

input
133356304
1870 8365
2572 3204

output
3076 33591

my code:

#include <stdio.h>
#include <math.h>

struct val{
long long int x;
long long int y;
};

int tam,resp;
long long int x,y;
long long int Pa[100], Pb[100];
long long int cust1,cust2,cap1 ...
by Pedro
Wed Apr 22, 2009 3:35 am
Forum: Volume 112 (11200-11299)
Topic: 11207 - The easiest way
Replies: 27
Views: 17366

Re: 11207 - The Easiest Way

Hello everybody!

Could you put more inputs here?
I tried all inputs posted here and the answers are equals.

thanks
by Pedro
Sat Jul 21, 2007 6:55 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 49574

Full code

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

int casos;
int i;
int dia,mes,ano;
int dia2,mes2,ano2;
int resultado;

int VerificaBissexto(int b){
if (b%100!=0){
if (b%4==0){
return 1;
}else{
return 0;
}
}else{
if (b%400==0){
return 1;
}else{
return 0;
}
}

}

void CalculaAnos ...
by Pedro
Fri Jul 20, 2007 5:43 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 49574

I tried all the inputs given and the outputs are correctly, but I got WA
I don't know where my code is wrong. Any idea?

void CalculaAnos(int d1,int d2,int m1,int m2,int a1,int a2,int numCaso){
int m,a,d;
if (a1==a2){
if (m1>=m2){
if (m2==m1){
if (d1>=d2){
printf("Case #%d: 0",numCaso ...

Go to advanced search