Search found 9 matches

by Md. Mijanur Rahman
Sun Jan 23, 2011 8:29 pm
Forum: Volume 6 (600-699)
Topic: 612 - DNA Sorting
Replies: 122
Views: 18435

Re: 612 - DNA Sorting

My mind is out..Why WA. I've got it 10 times. but it seems ok. Plz Plz Plz help me. Here is my code. #include<stdio.h> int main() { char a[105][105],ch; int b[105][2]={0},i,j,n,m,p,test; scanf("%d",&test); for(int k=1;k<=test;k++) { scanf("%d %d",&n,&m); ch=getchar(); for(i=0;i<m;i++) { for(j=0;j<n;...
by Md. Mijanur Rahman
Sat Jan 15, 2011 9:08 pm
Forum: Volume 109 (10900-10999)
Topic: 10954 - Add All
Replies: 80
Views: 29599

Re: 10954 - Add All

Runtime Error why??? I'm just dying with this problem. Someone Plz help me !!! :( #include<stdio.h> long int partition(long int m,long int p); void interchange(long int i,long int j); void quicksort(long int p,long int q); long int a[5500],num; int main() { long int carry,sum,total,i; while(scanf("%...
by Md. Mijanur Rahman
Sun Dec 19, 2010 11:14 am
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 27917

Re: 10110 - Light, More Light

why WA plz help

Code: Select all

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

int main()
{
	double n;
     
	while(scanf("%f",&n)==1)
	{ 
           if(floor(sqrt(n))==ceil(sqrt(n)))
	                                  printf("yes\n");
	  else printf("no\n");
	}
return 0;
}
by Md. Mijanur Rahman
Sun Dec 19, 2010 10:59 am
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 27917

Re: 10110 - Light, More Light

why TLE??? #include<stdio.h> int main() { long long int n,j,count; while(scanf("%lld",&n)==1) { count=0; if(n==0)break; if(n%2==0) for(j=1;j<=n;j++) { if(n%j==0) count++; } else for(j=1;j<=n;j+=2) { if(n%j==0) count++; } if(count%2!=0)printf("yes\n"); else printf("no\n"); } return 0; }
by Md. Mijanur Rahman
Sat Nov 06, 2010 7:14 pm
Forum: Volume 116 (11600-11699)
Topic: 11636 - Hello World!
Replies: 30
Views: 7337

Re: 11636 -why WA, plz help!!!!

#include<stdio.h> int main() { long int count,paste,n,i; i=1; while(scanf("%ld",&n)==1) { count=1;paste=0; if(n==-1)break; else if(n==1) paste=0; else { while(1) { count*=2; if(count>=n){paste++;break;} else paste++; } } printf("Case %ld: %ld\n",i++,paste); } return 0; }
by Md. Mijanur Rahman
Tue Feb 24, 2009 8:50 pm
Forum: Volume 115 (11500-11599)
Topic: 11526 - H(n)
Replies: 49
Views: 17529

Re: 11526 - H(n)

I have got TLE, please anyone honest help me as I am a beginner. Here is my code #include<stdio.h> int main() { long long n,res,i; int j,num; scanf("%d",&num); for(j=1;j<=num;j++) { scanf("%lld",&n); if(n<1) n=n*(-1); res=0; for(i=1;i<=n;i=i+1) { res = (res + n/i); } printf("%lld\n",res); } return 0...
by Md. Mijanur Rahman
Thu Nov 20, 2008 4:58 pm
Forum: Volume 105 (10500-10599)
Topic: 10515 - Powers Et Al.
Replies: 124
Views: 31728

Re: 10515 - Power et al.

/* What's the problem of my code please anyone inform me. I got wrong answer :oops: . */ #include<stdio.h> int main() { long long b,m,p,a[10000],i,x,power,j; while(scanf("%lld %lld",&b,&p)==2) { if((b==0)&&(p==0)) break; m=10; i=0; while(p!=0) { a[i++]=p%2; p=p/2; } x=1; power=b%m; for(j=0;j<i;j++) ...
by Md. Mijanur Rahman
Fri Nov 14, 2008 10:24 am
Forum: Volume 101 (10100-10199)
Topic: 10139 - Factovisors
Replies: 80
Views: 29826

Re:10193 - All you need is Love

/* I am totally astonished, I got WA, Please anyone help to find out the reason Here is my code: */ #include<stdio.h> #include<string.h> #include<math.h> int main(){ long int i,k,len1,len2,M,N,n,temp,flag,half,s1,s2; char a[100],b[100]; scanf("%ld",&n); for(half=1;half<=n;half++) { scanf("%s %s",a,b...
by Md. Mijanur Rahman
Thu Nov 13, 2008 2:18 pm
Forum: Volume 111 (11100-11199)
Topic: 11185 - Ternary
Replies: 34
Views: 14523

Re: 11185 - Ternary

Thank you so much, I have got accepted now.

Go to advanced search