#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(int argc, char const *argv[]) {
  int tail[3];
  scanf("%d %d %d", tail + 0, tail + 1, tail + 2);
  getchar();
  for (int i = 10; i < 100; i++) {
    if (i % 3 == tail[0] && i % 5 == tail[1] && i % 7 == tail[2]) {
      printf("%d\n", i);
      return 0;
    }
  }
  printf("No answer\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1c(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
add    $0x4,%rdx
lea    -0x1c(%rbp),%rcx
add    $0x8,%rcx
lea    0xe9f(%rip),%rdi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
movl   $0xa,-0x20(%rbp)
cmpl   $0x64,-0x20(%rbp)
jge    11ea <main+0xba>
mov    -0x20(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    -0x1c(%rbp),%edx
jne    11d7 <main+0xa7>
mov    -0x20(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    -0x18(%rbp),%edx
jne    11d7 <main+0xa7>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    -0x14(%rbp),%edx
jne    11d7 <main+0xa7>
mov    -0x20(%rbp),%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11ff <main+0xcf>
jmp    11dc <main+0xac>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1174 <main+0x44>
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
lea    0x10(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0xea9(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %r9d,%r9d
sub    0x14(%rsp),%r9d
xor    %r10d,%r10d
sub    0x10(%rsp),%r10d
sub    0xc(%rsp),%ebp
mov    $0xa,%esi
mov    $0xcccccccd,%r8d
mov    $0xaaaaaaab,%edi
jmp    1198 <main+0x58>
add    $0x1,%esi
cmp    $0x64,%esi
je     11fd <main+0xbd>
mov    %esi,%eax
mov    %rax,%rdx
imul   %rdi,%rdx
shr    $0x21,%rdx
lea    (%rdx,%rdx,2),%edx
mov    %ebp,%ebx
sub    %edx,%ebx
add    %esi,%ebx
jne    1190 <main+0x50>
mov    %rax,%rdx
imul   %r8,%rdx
shr    $0x22,%rdx
lea    (%rdx,%rdx,4),%edx
mov    %r10d,%ecx
sub    %edx,%ecx
add    %esi,%ecx
jne    1190 <main+0x50>
imul   $0x24924925,%rax,%rax
shr    $0x20,%rax
mov    %esi,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x2,%ecx
lea    0x0(,%rcx,8),%eax
sub    %eax,%ecx
add    %r9d,%ecx
add    %esi,%ecx
jne    1190 <main+0x50>
lea    0xe15(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1209 <main+0xc9>
lea    0xe09(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [10 x i8] c"No answer\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x i32]
%4 = bitcast [3 x i32]* %3 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %6, i32* %7)
%9 = call i32 (...) @getchar()
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = load i32, i32* %7
br label %13
13: ; preds = %2, %29
%14 = phi i32 [ 10, %2 ], [ %30, %29 ]
%15 = trunc i32 %14 to i8
%16 = urem i8 %15, 3
%17 = zext i8 %16 to i32
%18 = icmp eq i32 %10, %17
br i1 %18, label %19, label %29
19: ; preds = %13
%20 = urem i8 %15, 5
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %11, %21
br i1 %22, label %23, label %29
23: ; preds = %19
%24 = urem i8 %15, 7
%25 = zext i8 %24 to i32
%26 = icmp eq i32 %12, %25
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %34
29: ; preds = %13, %19, %23
%30 = add nuw nsw i32 %14, 1
%31 = icmp eq i32 %30, 100
br i1 %31, label %32, label %13
32: ; preds = %29
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %34
34: ; preds = %27, %32
ret i32 0
}