#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 Casos, Cont, KmAv, QtdRadar;
  double KmRad, QtdRadFloat;
  scanf("%u", &Casos);
  for (Cont = 0; Cont < Casos; Cont++) {
    scanf("%u%lf", &KmAv, &KmRad);
    QtdRadFloat = KmAv / KmRad;
    QtdRadar = (int)QtdRadFloat;
    if (QtdRadFloat > QtdRadar)
      QtdRadar++;
    printf("%d\n", QtdRadar);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    11c5 <main+0xa5>
lea    0xea8(%rip),%rdi
xor    %eax,%eax
lea    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvttsd2si -0x28(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x14(%rbp),%eax
cvtsi2sd %rax,%xmm1
ucomisd %xmm1,%xmm0
jbe    11a8 <main+0x88>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <main+0x28>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecd(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,(%rsp)
je     11aa <main+0x8a>
lea    0xeb9(%rip),%r14
lea    0x4(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0xeae(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
xor    %esi,%esi
ucomisd %xmm1,%xmm0
seta   %sil
add    %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    (%rsp),%ebp
jb     1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
@.str.1 = [6 x i8] c"%u%lf\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
%8 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %9
9: ; preds = %31, %0
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = icmp ult i32 %10, %11
br i1 %12, label %13, label %34
13: ; preds = %9
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, double* %6)
%15 = load i32, i32* %4
%16 = uitofp i32 %15 to double
%17 = load double, double* %6
%18 = fdiv double %16, %17
store double %18, double* %7
%19 = load double, double* %7
%20 = fptosi double %19 to i32
store i32 %20, i32* %5
%21 = load double, double* %7
%22 = load i32, i32* %5
%23 = uitofp i32 %22 to double
%24 = fcmp ogt double %21, %23
br i1 %24, label %25, label %28
25: ; preds = %13
%26 = load i32, i32* %5
%27 = add i32 %26, 1
store i32 %27, i32* %5
br label %28
28: ; preds = %25, %13
%29 = load i32, i32* %5
%30 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %28
%32 = load i32, i32* %3
%33 = add i32 %32, 1
store i32 %33, i32* %3
br label %9
34: ; preds = %9
ret i32 0
}

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