#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 n, a, b, c, d, e, f, g;
  scanf("%d", &n);
  a = n / 100;
  b = (n % 100) / 50;
  c = ((n % 100) % 50) / 20;
  d = (((n % 100) % 50) % 20) / 10;
  e = ((((n % 100) % 50) % 20) % 10) / 5;
  f = (((((n % 100) % 50) % 20) % 10) % 5) / 2;
  g = ((((((n % 100) % 50) % 20) % 10) % 5) % 2) / 1;
  printf("%d\n", n);
  printf("%d nota(s) de R$ 100,00\n", a);
  printf("%d nota(s) de R$ 50,00\n", b);
  printf("%d nota(s) de R$ 20,00\n", c);
  printf("%d nota(s) de R$ 10,00\n", d);
  printf("%d nota(s) de R$ 5,00\n", e);
  printf("%d nota(s) de R$ 2,00\n", f);
  printf("%d nota(s) de R$ 1,00\n", g);
  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
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd86(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xd7b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xd85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xd8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xd97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xda0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xda8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xdb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%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
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x51eb851f,%rsi,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x25,%rbx
add    %eax,%ebx
imul   $0x64,%ebx,%ecx
mov    %esi,%eax
sub    %ecx,%eax
movsbl %al,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,8),%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0xb,%edx
add    %cl,%dl
movsbl %dl,%ecx
mov    %ecx,(%rsp)
movzbl %cl,%ecx
imul   $0x32,%ecx,%ecx
sub    %cl,%al
movsbl %al,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0xb,%ecx
shr    $0xf,%edx
add    %cl,%dl
movsbl %dl,%r15d
movzbl %r15b,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0xa,%ecx
shr    $0xf,%edx
add    %cl,%dl
movsbl %dl,%r12d
movzbl %r12b,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0x9,%ecx
shr    $0xf,%edx
add    %cl,%dl
movsbl %dl,%ebp
movzbl %bpl,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
mov    %eax,%ecx
shr    $0x7,%cl
add    %al,%cl
mov    %ecx,%edx
sar    %dl
movsbl %dl,%r14d
and    $0xfe,%cl
sub    %cl,%al
movsbl %al,%r13d
lea    0xe05(%rip),%rdi
call   1030 <printf@plt>
lea    0xdfd(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xe08(%rip),%rdi
mov    (%rsp),%esi
call   1030 <printf@plt>
lea    0xe11(%rip),%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
lea    0xe1a(%rip),%rdi
mov    %r12d,%esi
call   1030 <printf@plt>
lea    0xe23(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
lea    0xe34(%rip),%rdi
mov    %r13d,%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 = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [25 x i8] c"%d nota(s) de R$ 100,00\0A\00"
@.str.3 = [24 x i8] c"%d nota(s) de R$ 50,00\0A\00"
@.str.4 = [24 x i8] c"%d nota(s) de R$ 20,00\0A\00"
@.str.5 = [24 x i8] c"%d nota(s) de R$ 10,00\0A\00"
@.str.6 = [23 x i8] c"%d nota(s) de R$ 5,00\0A\00"
@.str.7 = [23 x i8] c"%d nota(s) de R$ 2,00\0A\00"
@.str.8 = [23 x i8] c"%d nota(s) de R$ 1,00\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
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 100
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = srem i32 %13, 100
%15 = sdiv i32 %14, 50
store i32 %15, i32* %4
%16 = load i32, i32* %2
%17 = srem i32 %16, 100
%18 = srem i32 %17, 50
%19 = sdiv i32 %18, 20
store i32 %19, i32* %5
%20 = load i32, i32* %2
%21 = srem i32 %20, 100
%22 = srem i32 %21, 50
%23 = srem i32 %22, 20
%24 = sdiv i32 %23, 10
store i32 %24, i32* %6
%25 = load i32, i32* %2
%26 = srem i32 %25, 100
%27 = srem i32 %26, 50
%28 = srem i32 %27, 20
%29 = srem i32 %28, 10
%30 = sdiv i32 %29, 5
store i32 %30, i32* %7
%31 = load i32, i32* %2
%32 = srem i32 %31, 100
%33 = srem i32 %32, 50
%34 = srem i32 %33, 20
%35 = srem i32 %34, 10
%36 = srem i32 %35, 5
%37 = sdiv i32 %36, 2
store i32 %37, i32* %8
%38 = load i32, i32* %2
%39 = srem i32 %38, 100
%40 = srem i32 %39, 50
%41 = srem i32 %40, 20
%42 = srem i32 %41, 10
%43 = srem i32 %42, 5
%44 = srem i32 %43, 2
%45 = sdiv i32 %44, 1
store i32 %45, i32* %9
%46 = load i32, i32* %2
%47 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %3
%49 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %4
%51 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %5
%53 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %52)
%54 = load i32, i32* %6
%55 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %54)
%56 = load i32, i32* %7
%57 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %56)
%58 = load i32, i32* %8
%59 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %9
%61 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %60)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [25 x i8] c"%d nota(s) de R$ 100,00\0A\00"
@.str.3 = [24 x i8] c"%d nota(s) de R$ 50,00\0A\00"
@.str.4 = [24 x i8] c"%d nota(s) de R$ 20,00\0A\00"
@.str.5 = [24 x i8] c"%d nota(s) de R$ 10,00\0A\00"
@.str.6 = [23 x i8] c"%d nota(s) de R$ 5,00\0A\00"
@.str.7 = [23 x i8] c"%d nota(s) de R$ 2,00\0A\00"
@.str.8 = [23 x i8] c"%d nota(s) de R$ 1,00\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = sdiv i32 %4, 100
%6 = srem i32 %4, 100
%7 = trunc i32 %6 to i8
%8 = sdiv i8 %7, 50
%9 = sext i8 %8 to i32
%10 = srem i8 %7, 50
%11 = sdiv i8 %10, 20
%12 = sext i8 %11 to i32
%13 = srem i8 %10, 20
%14 = sdiv i8 %13, 10
%15 = sext i8 %14 to i32
%16 = srem i8 %13, 10
%17 = sdiv i8 %16, 5
%18 = sext i8 %17 to i32
%19 = srem i8 %16, 5
%20 = sdiv i8 %19, 2
%21 = sext i8 %20 to i32
%22 = srem i8 %19, 2
%23 = sext i8 %22 to i32
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%25 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%26 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%27 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %12)
%28 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%29 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %18)
%30 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %21)
%31 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %23)
ret i32 0
}