Contact : +88 01840-723661

|

Email : info@jakafind.com

Beecrowd Problem 1081-1100 Solve by C

Beecrowd Problem 1081-1100 Solve by C

Beecrowd-Problem-List
Beecrowd-Problem-List

 

Beecrowd Problem 1081

}

Beecrowd Problem 1082

 

Beecrowd Problem 1083


Beecrowd Problem 1084


Beecrowd Problem 1085


Beecrowd Problem 1086


Beecrowd Problem 1087


Beecrowd Problem 1088

 

Beecrowd Problem 1089

 

Beecrowd Problem 1090


Beecrowd Problem 1091


Beecrowd Problem 1092


Beecrowd Problem 1093


Beecrowd Problem 1094

#include<stdio.h>
int main()
{
    int i,n,m;char a,b;int sum=0,sum1=0,sum2=0,sum3;
    double t,l,y;
    b='%';
    scanf("%d",&m);
    for(i=1;i<=m;i++){

        scanf("%d %c",&n,&a);
       if('C'==a){
        sum=sum+n;
       }
       if('R'==a){
        sum1=sum1+n;
       }
       if('S'==a){
        sum2=sum2+n;
       }
    }
    sum3=sum+sum1+sum2;
    t=(sum/(sum3*1.0))*100.00;
    l=(sum1/(sum3*1.0))*100.00;
    y=(sum2/(sum3*1.0))*100.00;
    printf("Total: %d cobaias\n",sum3);
    printf("Total de coelhos: %d\n",sum);
    printf("Total de ratos: %d\n",sum1);
    printf("Total de sapos: %d\n",sum2);
    printf("Percentual de coelhos: %.2lf %c\n",t,b);
    printf("Percentual de ratos: %.2lf %c\n",l,b);
    printf("Percentual de sapos: %.2lf %c\n",y,b);
}

Beecrowd Problem 1095

#include<stdio.h>

int main()
{
    int i,j;
    for(i=1,j=60;i<15,j>=0;i+=3,j-=5){

            printf("I=%d J=%d\n",i,j);
        }

}

Beecrowd Problem 1096

 

Beecrowd Problem 1097

#include <stdio.h>

int main()
{
    int I,J;
    for(I=1;I<=9;I=I+2)
    {
        for(J=6+I;J>3+I;J--)
            printf ("I=%d J=%d\n",I,J);
    }
    return 0;
}

Beecrowd Problem 1098

#include <stdio.h>

int main(){
    float i = 0;
    float j = 1;
    
    while(i <= 2.2){
            if((i>0 && i<1)|| (i>1 && i<2) || (i>2.1 && i<=2.2) )
			{
			    printf("I=%0.1f J=%0.1f\n",i,j+i);
                            printf("I=%0.1f J=%0.1f\n",i,j+1+i);
                            printf("I=%0.1f J=%0.1f\n",i,j+2+i);
			}
			else
			{
			    printf("I=%d J=%d\n",(int)i,(int)j+(int)i);
                            printf("I=%d J=%d\n",(int)i,(int)j+1+(int)i);
                            printf("I=%d J=%d\n",(int)i,(int)j+2+(int)i);
			}
            
            i+= 0.2;
    }
    return 0;
}

Beecrowd Problem 1099

#include<stdio.h>

int main(){
    
    int n;
    int x, y, aux;
    int soma;
    
    scanf("%d",&n);
    
    while(1){
                if(n == 0) break;
                scanf("%d%d",&x,&y);

                if(x > y){
                     aux = x;
                     x = y;
                     y = aux;
                }
                soma = 0;
                for(int i = x+1; i < y; i++){
                       if(i%2 != 0) soma += i;
                }
                printf("%d\n",soma);
                n--;
    }
    return 0;
}

Beecrowd Problem 1100


 

Leave a Reply

Your email address will not be published. Required fields are marked *