#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 *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int t, num, count, i, j;
  scanf("%d", &t);
  while (t--) {
    count = 0;
    scanf("%d", &num);
    for (i = 5; i <= num; i = i + 5)
      printf("\n%d", count);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     119f <main+0x7f>
movl   $0x0,-0x10(%rbp)
lea    0xea0(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x5,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     119a <main+0x7a>
mov    -0x10(%rbp),%esi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x14(%rbp)
jmp    1171 <main+0x51>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
subl   $0x1,0x4(%rsp)
jae    114c <main+0x2c>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xeae(%rip),%r14
mov    %rsp,%r15
lea    0xea3(%rip),%rbx
jmp    1167 <main+0x47>
nop
subl   $0x1,0x4(%rsp)
jb     113f <main+0x1f>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
cmpl   $0x5,(%rsp)
jl     1160 <main+0x40>
mov    $0x5,%ebp
nopl   (%rax)
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
add    $0x5,%ebp
cmp    (%rsp),%ebp
jle    1180 <main+0x60>
jmp    1160 <main+0x40>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\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* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp eq i32 %6, 0
br i1 %8, label %23, label %13
9: ; preds = %17, %13
%10 = load i32, i32* %1
%11 = add nsw i32 %10, -1
store i32 %11, i32* %1
%12 = icmp eq i32 %10, 0
br i1 %12, label %23, label %13
13: ; preds = %0, %9
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 5
br i1 %16, label %9, label %17
17: ; preds = %13, %17
%18 = phi i32 [ %20, %17 ], [ 5, %13 ]
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%20 = add nuw nsw i32 %18, 5
%21 = load i32, i32* %2
%22 = icmp sgt i32 %20, %21
br i1 %22, label %9, label %17
23: ; preds = %9, %0
ret i32 0
}