Search found 19 matches

by chinmoy kanti dhar
Mon Aug 25, 2008 11:08 pm
Forum: Volume 114 (11400-11499)
Topic: 11461 - Square Numbers
Replies: 15
Views: 6927

Re: 11461 - Square Number

why compiler error?????

Code: Select all

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


void main()
{
long m,n,a,b;
while(scanf("%ld %ld",&a,&b))
{
if(a==0&&b==0)break;
m=sqrt(a);
if(m*m==a)m--;
n=sqrt(b);

m=n-m;
printf("%ld\n",m);
}

}

by chinmoy kanti dhar
Thu Aug 23, 2007 11:28 pm
Forum: Volume 2 (200-299)
Topic: 202 - Repeating Decimals
Replies: 82
Views: 10785

thanks jan.i have acepted now.
by chinmoy kanti dhar
Thu Aug 23, 2007 7:14 pm
Forum: Volume 2 (200-299)
Topic: 202 - Repeating Decimals
Replies: 82
Views: 10785

help me

my program gives right output for all the input given in this page.but i am getting wr.

Code: Select all

  remove after AC
by chinmoy kanti dhar
Tue Aug 21, 2007 6:56 pm
Forum: Volume 3 (300-399)
Topic: 357 - Let Me Count The Ways
Replies: 90
Views: 7319

thanks.now i have accepted it.
by chinmoy kanti dhar
Tue Aug 21, 2007 6:03 pm
Forum: Volume 3 (300-399)
Topic: 357 - Let Me Count The Ways
Replies: 90
Views: 7319

help me

but i am getting wrong answer.here is the code-

[code]
cut after AC
[/code]
by chinmoy kanti dhar
Sun Aug 19, 2007 9:23 pm
Forum: Volume 3 (300-399)
Topic: 357 - Let Me Count The Ways
Replies: 90
Views: 7319

wr

give some input output plz?

30000= 543427145501
20000= 107683177001
0=1
is these output are right?
by chinmoy kanti dhar
Sat Aug 18, 2007 7:09 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 36711

getting RTE

Why runtime error? help me plz #include<stdio.h> #include<math.h> #define ma 100000 long n; void main() { long a[ma]={0},c,i,j,k,m,p[10000]; //prime for(i=2;i<=sqrt(ma);i++) if(a[i]==0) for(j=i+i;j<=ma;j=j+i)a[j]=1; j=1; for(i=2;i<=ma;i++) if(a[i]==0)p[j++]=i; while(scanf("%ld",&n)==1) { if(n==0)bre...
by chinmoy kanti dhar
Fri Aug 17, 2007 7:22 pm
Forum: Volume 112 (11200-11299)
Topic: 11247 - Income Tax
Replies: 50
Views: 20739

Thanks mohsin for reply. I have modified my code but still I am getting tle.help plz #include<stdio.h> #include<string.h> #include<math.h> void main() { long i,j,p,a,sm; double n,b,m,k; while(scanf("%ld %lf",&a,&b)==2) { if(a==0&&b==0)break; if(b==0||b==1||b==100){printf("Not found\n");continue;} p=...
by chinmoy kanti dhar
Fri Aug 17, 2007 12:56 am
Forum: Volume 112 (11200-11299)
Topic: 11247 - Income Tax
Replies: 50
Views: 20739

TLE

help me plz.how can i solve it within the time limit.... #include<stdio.h> #include<string.h> #include<math.h> void main() { long i,j,p,a,sum; double n,b,m,k; while(scanf("%ld %lf",&a,&b)==2) { if(a==0&&b==0)break; if(b==0||b==1||b==100){printf("Not found\n");continue;} p=0; for(i=a;;i++) { m=double...
by chinmoy kanti dhar
Sun Jul 15, 2007 10:31 pm
Forum: Volume 4 (400-499)
Topic: 424 - Integer Inquiry
Replies: 96
Views: 19853

i am getting wrong answer

here is the code:- #include<stdio.h> #include<string.h> void main() { long b,n,m=0,i,p,j,q,k,a[3000]={0}; char c[300]; //freopen("c:\\123.txt","w",stdout); while(scanf("%s",c)==1) { p=strlen(c);k=1;n=0; if(strcmp(c,"0")!=0) { for(i=p-1;i>=0;i--) { a[k]=a[k]+(c -48)+n; if(a[k]>9) {a[k]=a[k]%10;n=1;} ...
by chinmoy kanti dhar
Sun Jul 15, 2007 1:00 am
Forum: Volume 112 (11200-11299)
Topic: 11221 - Magic square palindromes.
Replies: 58
Views: 20693

thanks tanvir.now i have accepted the pb.thanks for the help.
by chinmoy kanti dhar
Sun Jul 15, 2007 12:04 am
Forum: Volume 112 (11200-11299)
Topic: 11221 - Magic square palindromes.
Replies: 58
Views: 20693

thanks tanvir for ur reply.but i dont understanad why it will cause pb.my program's pb is invalid memory reference.it is necessary to increase array size?
by chinmoy kanti dhar
Sat Jul 14, 2007 11:22 pm
Forum: Volume 112 (11200-11299)
Topic: 11221 - Magic square palindromes.
Replies: 58
Views: 20693

why run time error

this program gives run time error(signal 11).help me plz

code:
cut
by chinmoy kanti dhar
Sat Jul 14, 2007 7:20 pm
Forum: Volume 111 (11100-11199)
Topic: 11152 - Colourful Flowers
Replies: 45
Views: 21813

thanks mmonis.
by chinmoy kanti dhar
Fri Jul 13, 2007 1:51 am
Forum: Volume 111 (11100-11199)
Topic: 11152 - Colourful Flowers
Replies: 45
Views: 21813

why wr????

help me plz....

cut after accepted

Go to advanced search