Search found 3 matches

by rumel_new
Wed May 07, 2003 1:09 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 101808

Why i got WA
here is my code:
[cpp] #include<stdio.h>
#include<stdlib.h>
void main ()
{
unsigned long x,y;
unsigned long carry,temp_carry,temp_x,temp_y;
while(2 == scanf("%lu %lu",&x,&y))
{
if((x == 0) && (y == 0))
break;
else
{
carry =0;
temp_carry = 0;
while(x)
{
temp_x = x%10;
x = x / 10;
temp_y ...
by rumel_new
Mon Mar 31, 2003 11:07 am
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 67745

10013 no problem shows me P.E. why???

here is my code:
[cpp]#include<stdio.h>
#include<stdlib.h>
void main ()
{
long int loop,m,i,n,carry,k,ff;
char *x,*y,*z;
scanf("%ld",&loop);
for(m=0;m<loop;m++)
{
scanf("%ld",&n);
x=( char*)malloc(n*sizeof(char));
y=( char *)malloc(n*sizeof(char));
z=( char*)malloc((n+1)*sizeof(char ...
by rumel_new
Tue Feb 25, 2003 5:55 pm
Forum: Volume 101 (10100-10199)
Topic: 10107 - What is the Median?
Replies: 74
Views: 31458

problem 10107

what is the wrong of this problem?

# include <stdio.h>
# include <math.h>
# include <ctype.h>
void main(){
long i,j,k,n,a[100],c=0;
i=0;
while(1==scanf("%ld",&a[i])){
c++;
for (k=0;k<c;k++)
for (j=k+1;j<c;j++)
if (a[i]<a[j]){
int t=a[i];
a[i]=a[j];
a[j]=t;
}
long d=floor(c/2);
if (c ...

Go to advanced search