Search found 10 matches

by liya
Mon Jul 06, 2015 9:13 am
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 53751

Re: 10070 - Leap Year or Not Leap Year and ...

getting WA..i need help : #include<stdio.h> int main() { long long int i,j; while((scanf("%lld",&i))!=EOF) { if((i%4==0&&i%100!=0)||(i%400==0)) { if(i%15==0&&i%55==0) { printf("This is leap year.\n"); printf("This is huluculu festival year.\n"); printf("This is buluculu festival year.\n"); } else if...
by liya
Tue Jun 09, 2015 7:43 pm
Forum: Volume 117 (11700-11799)
Topic: 11723 - Numbering Roads
Replies: 32
Views: 6177

Re: 11723 - Numbering Roads

getting WA!!!!!!!! :( I NEED HELP!!! #include<stdio.h> int main() { long long int i,r,n,t,j,s; for(i=1; ;i++ ) { scanf("%lld %lld",&r,&n); if(r==0&&n==0) { break; } if((n*26)+n<r) { printf("Case %lld: impossible\n",i); } else { if((r-n)%n==0) { s=(r-n)/n; printf("Case %lld: %lld\n",i,s); } else { if...
by liya
Fri Feb 06, 2015 3:51 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 19188

Re: 382 - Perfection

presentation error: #include<stdio.h> int main() { long long int i,n,j,count=0; for( ; ; ) { long long int sum=0; scanf("%lld",&n); if(n==0) { printf("END OF OUTPUT\n"); break; } if(count!=1) { printf("PERFECTION OUTPUT\n"); } count=1; for(i=1;i<=n/2;i++) { if(n%i==0) { sum=sum+i; } } if(sum==n) { p...
by liya
Wed Jan 28, 2015 10:17 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 16106

Re: 113 - Power of Cryptography

WA.....

Code: Select all

#include<stdio.h>
#include<math.h>
int main()
{
  double n,p,k;

while((scanf("%lf %lf",&n,&p))!=EOF)
{
k=pow(p,(1.0/n));
printf("%.0lf\n",k);

}
return 0;


}
by liya
Wed Jan 28, 2015 8:11 am
Forum: Volume 117 (11700-11799)
Topic: 11715 - Car
Replies: 14
Views: 4626

Re: 11715 - Car

thanks :) brianfry713
by liya
Tue Jan 27, 2015 8:42 pm
Forum: Volume 100 (10000-10099)
Topic: 10079 - Pizza Cutting
Replies: 44
Views: 10149

Re: 10079 - Pizza Cutting

WA....

Code: Select all

#include<stdio.h>
int main()
{
     long long int n;
    for( ; ; )
    {
        if(n<0)
        {
            break;
        }
        scanf("%lld",&n);
        printf("%lld\n",(n*(n+1)/2)+1);
    }
    return 0;
}
by liya
Tue Jan 27, 2015 8:25 pm
Forum: Volume 117 (11700-11799)
Topic: 11715 - Car
Replies: 14
Views: 4626

Re: 11715 - Car

WA.....what's wrong with this? #include<stdio.h> #include<math.h> int main() { double u,v,a,s,t,re; int n,i; for(i=1; ;i++) { scanf("%d",&n); if(n==0) { break; } if(n==1) { scanf("%lf %lf %lf",&u,&v,&t); a=(v-u)/t; s=((v*v)-(u*u))/(2*a); printf("Case %d: %.3lf %.3lf\n",i,s,a); } else if(n==2) { scan...
by liya
Tue Jan 27, 2015 5:47 pm
Forum: Volume 100 (10000-10099)
Topic: 10079 - Pizza Cutting
Replies: 44
Views: 10149

WA-10079

it's gettung WA...???

Code: Select all

#include<stdio.h>
int main()
{
     long long int n;
    for( ; ; )
    {
        if(n<0)
        {
            break;
        }
        scanf("%lld",&n);
        printf("%lld\n",(n*(n+1)/2)+1);
    }
    return 0;
}
by liya
Fri Jan 23, 2015 8:34 pm
Forum: Volume 109 (10900-10999)
Topic: 10924 - Prime Words
Replies: 44
Views: 22426

Re: 10924 - Prime Words

prob:10924.......it's getting WA..... #include<stdio.h> int main() { char str[20]; int i,sum,count; while((scanf("%s",&str))!=EOF) { sum=0; for(i=0;str[i]!='\0';i++) { if(str[i]>='a'&&str[i]<='z') { sum=sum+str[i]-'a'+1; } else { sum=sum+str[i]-'A'+27; } } count=0; for(i=2;i<=sum/2;i++) { if(sum%i==...
by liya
Fri Jan 23, 2015 8:22 pm
Forum: Volume 100 (10000-10099)
Topic: 10071 - Back to High School Physics
Replies: 49
Views: 7567

Re: Which problem is the easiest problem of this site?

prob no:10071....it's getting RE....what's the problem?here is my code.....

Code: Select all

#include<stdio.h>
int main()
{
   int v,t,s;
   while((scanf("%d %d",&v,&t))!=EOF)
   {
       s=v*t*2;
   printf("%d\n",s);
   }



}

Go to advanced search