#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(void) {
  int casos, numero, multiplosDe2 = 0, multiplosDe3 = 0, multiplosDe4 = 0,
                     multiplosDe5 = 0;
  scanf("%d\n", &casos);
  while (casos-- > 0) {
    scanf("%d\n", &numero);
    if (numero % 2 == 0) {
      multiplosDe2++;
    }
    if (numero % 3 == 0) {
      multiplosDe3++;
    }
    if (numero % 4 == 0) {
      multiplosDe4++;
    }
    if (numero % 5 == 0) {
      multiplosDe5++;
    }
  }
  printf("%d Multiplo(s) de 2\n", multiplosDe2);
  printf("%d Multiplo(s) de 3\n", multiplosDe3);
  printf("%d Multiplo(s) de 4\n", multiplosDe4);
  printf("%d Multiplo(s) de 5\n", multiplosDe5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xeae(%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
jle    11f8 <main+0xd8>
lea    0xe8a(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    119c <main+0x7c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b9 <main+0x99>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11d6 <main+0xb6>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11f3 <main+0xd3>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115b <main+0x3b>
mov    -0x10(%rbp),%esi
lea    0xe02(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe08(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe0e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe14(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsp)
test   %eax,%eax
jle    11bc <main+0x9c>
xor    %r14d,%r14d
lea    0xeaf(%rip),%r12
lea    0x4(%rsp),%r13
xor    %r15d,%r15d
xor    %ebx,%ebx
xor    %ebp,%ebp
nopl   (%rax)
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,%ecx
not    %ecx
and    $0x1,%ecx
add    %ecx,%ebp
imul   $0xaaaaaaab,%eax,%ecx
add    $0x2aaaaaaa,%ecx
cmp    $0x55555555,%ecx
adc    $0x0,%ebx
imul   $0xcccccccd,%eax,%ecx
and    $0x3,%eax
cmp    $0x1,%eax
adc    $0x0,%r15d
add    $0x19999999,%ecx
cmp    $0x33333333,%ecx
adc    $0x0,%r14d
mov    (%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsp)
test   %eax,%eax
jg     1160 <main+0x40>
jmp    11c6 <main+0xa6>
xor    %ebp,%ebp
xor    %ebx,%ebx
xor    %r15d,%r15d
xor    %r14d,%r14d
lea    0xe37(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe3e(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xe45(%rip),%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
lea    0xe4b(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [21 x i8] c"%d Multiplo(s) de 2\0A\00"
@.str.2 = [21 x i8] c"%d Multiplo(s) de 3\0A\00"
@.str.3 = [21 x i8] c"%d Multiplo(s) de 4\0A\00"
@.str.4 = [21 x i8] c"%d Multiplo(s) de 5\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %9
9: ; preds = %42, %0
%10 = load i32, i32* %2
%11 = add nsw i32 %10, -1
store i32 %11, i32* %2
%12 = icmp sgt i32 %10, 0
br i1 %12, label %13, label %43
13: ; preds = %9
%14 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%15 = load i32, i32* %3
%16 = srem i32 %15, 2
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %21
21: ; preds = %18, %13
%22 = load i32, i32* %3
%23 = srem i32 %22, 3
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %28
28: ; preds = %25, %21
%29 = load i32, i32* %3
%30 = srem i32 %29, 4
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %28
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %35
35: ; preds = %32, %28
%36 = load i32, i32* %3
%37 = srem i32 %36, 5
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %35
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %42
42: ; preds = %39, %35
br label %9
43: ; preds = %9
%44 = load i32, i32* %4
%45 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %5
%47 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %6
%49 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %7
%51 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %50)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [21 x i8] c"%d Multiplo(s) de 2\0A\00"
@.str.2 = [21 x i8] c"%d Multiplo(s) de 3\0A\00"
@.str.3 = [21 x i8] c"%d Multiplo(s) de 4\0A\00"
@.str.4 = [21 x i8] c"%d Multiplo(s) de 5\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 ([4 x i8], [4 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 sgt i32 %6, 0
br i1 %8, label %9, label %34
9: ; preds = %0, %9
%10 = phi i32 [ %30, %9 ], [ 0, %0 ]
%11 = phi i32 [ %26, %9 ], [ 0, %0 ]
%12 = phi i32 [ %22, %9 ], [ 0, %0 ]
%13 = phi i32 [ %18, %9 ], [ 0, %0 ]
%14 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %2
%16 = and i32 %15, 1
%17 = xor i32 %16, 1
%18 = add nuw nsw i32 %17, %13
%19 = srem i32 %15, 3
%20 = icmp eq i32 %19, 0
%21 = zext i1 %20 to i32
%22 = add nuw nsw i32 %12, %21
%23 = and i32 %15, 3
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i32
%26 = add nuw nsw i32 %11, %25
%27 = srem i32 %15, 5
%28 = icmp eq i32 %27, 0
%29 = zext i1 %28 to i32
%30 = add nuw nsw i32 %10, %29
%31 = load i32, i32* %1
%32 = add nsw i32 %31, -1
store i32 %32, i32* %1
%33 = icmp sgt i32 %31, 0
br i1 %33, label %9, label %34
34: ; preds = %9, %0
%35 = phi i32 [ 0, %0 ], [ %18, %9 ]
%36 = phi i32 [ 0, %0 ], [ %22, %9 ]
%37 = phi i32 [ 0, %0 ], [ %26, %9 ]
%38 = phi i32 [ 0, %0 ], [ %30, %9 ]
%39 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%40 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%41 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%42 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %38)
ret i32 0
}