You are not logged in. Please login at www.codechef.com to post your questions!

×

What's wrong with the judge?

I was solving a problem 'FCRTL' and I got wrong answer for the following input, can anyone explain why?

#include <stdio.h>

int main(){
    long long int t;
    scanf("%lld",&t);
    long long int arr[t];
        for(int i=0;i<t;i++){
            scanf("%lld",&arr[i]);
        }
        for(int k=0;k<t;k++){
            long long int sum = 0;
            for(int i=5;i<arr[k];i=i*5){
                long long int quo=arr[k]/i;
                sum = sum + quo;
            }
            printf("%lld\n",sum);
        }
    }

asked 25 Sep '18, 16:37

gigawhiz's gravatar image

3★gigawhiz
-1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,321
×1,470
×933

question asked: 25 Sep '18, 16:37

question was seen: 47 times

last updated: 25 Sep '18, 16:37