#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned int n, t, c10;
  scanf("%u", &t);
  while (t > 0) {
    t--;
    scanf("%u", &n);
    c10 = 0;
    n = n / 5;
    while (n > 0) {
      c10 += n;
      n = n / 5;
    }
    printf("%u\n", c10);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jbe    11b3 <main+0x93>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    119f <main+0x7f>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
jmp    1178 <main+0x58>
mov    -0x10(%rbp),%esi
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%eax
test   %eax,%eax
je     11a9 <main+0x89>
lea    0xebb(%rip),%r14
lea    0x4(%rsp),%r15
mov    $0xcccccccd,%ebx
lea    0xead(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
add    $0xffffffff,%eax
mov    %eax,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
xor    %ecx,%ecx
mov    0x4(%rsp),%eax
nopw   0x0(%rax,%rax,1)
mov    %ecx,%esi
mov    %eax,%edx
mov    %eax,%eax
imul   %rbx,%rax
shr    $0x22,%rax
lea    (%rsi,%rax,1),%ecx
cmp    $0x4,%edx
ja     1180 <main+0x60>
mov    %eax,0x4(%rsp)
mov    %r12,%rdi
call   1030 <printf@plt>
mov    (%rsp),%eax
test   %eax,%eax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
@.str.1 = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %3
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add i32 %10, -1
store i32 %11, i32* %3
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %4
%13 = load i32, i32* %2
%14 = udiv i32 %13, 5
store i32 %14, i32* %2
br label %15
15: ; preds = %18, %9
%16 = load i32, i32* %2
%17 = icmp ugt i32 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load i32, i32* %2
%20 = load i32, i32* %4
%21 = add i32 %20, %19
store i32 %21, i32* %4
%22 = load i32, i32* %2
%23 = udiv i32 %22, 5
store i32 %23, i32* %2
br label %15
24: ; preds = %15
%25 = load i32, i32* %4
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %6
27: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
@.str.1 = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
br i1 %7, label %23, label %8
8: ; preds = %0, %19
%9 = phi i32 [ %21, %19 ], [ %6, %0 ]
%10 = add i32 %9, -1
store i32 %10, i32* %2
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = load i32, i32* %1
br label %13
13: ; preds = %13, %8
%14 = phi i32 [ %12, %8 ], [ %16, %13 ]
%15 = phi i32 [ 0, %8 ], [ %18, %13 ]
%16 = udiv i32 %14, 5
%17 = icmp ult i32 %14, 5
%18 = add i32 %15, %16
br i1 %17, label %19, label %13
19: ; preds = %13
store i32 %16, i32* %1
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %8
23: ; preds = %19, %0
ret i32 0
}