About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

সোমবার, ২৬ মে, ২০১৪

Light Oj: 1109 - False Ordering

http://lightoj.com/volume_showproblem.php?problem=1045




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

using namespace std;
double ary[1000010];
int main()
{
    int i,test,j,base,num;
     double res,sum=0;
    
    
      for(i=1;i<=1000000;i++){
     sum+=log10(i);
     ary[i]=sum;
     }
   
      cin>>test;
      for(j=1;j<=test;j++){
     scanf("%d %d",&num,&base);
     res=ary[num];
     res=(res/log10(base))+1;
     printf("Case %d: %d\n",j,(int)res);

      }

    return 0;
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন