#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 /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int i, a, b, c, n = -1;
  scanf("%d%d%d", &a, &b, &c);
  for (i = 10; i <= 100; i++)
    if (i % 3 == a && i % 5 == b && i % 7 == c) {
      n = i;
      break;
    }
  if (n < 0)
    printf("No answer\n");
  else
    printf("%d\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x18(%rbp)
lea    0xec3(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1040 <scanf@plt>
movl   $0xa,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     11b9 <main+0x99>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    -0xc(%rbp),%edx
jne    11a6 <main+0x86>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    -0x10(%rbp),%edx
jne    11a6 <main+0x86>
mov    -0x8(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    -0x14(%rbp),%edx
jne    11a6 <main+0x86>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11b9 <main+0x99>
jmp    11ab <main+0x8b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <main+0x35>
cmpl   $0x0,-0x18(%rbp)
jge    11d6 <main+0xb6>
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e7 <main+0xc7>
mov    -0x18(%rbp),%esi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
xor    %edi,%edi
xor    %r9d,%r9d
sub    0xc(%rsp),%r9d
xor    %r10d,%r10d
sub    0x10(%rsp),%r10d
sub    0x14(%rsp),%edi
mov    $0xa,%esi
mov    $0xcccccccd,%r8d
mov    $0xaaaaaaab,%r11d
jmp    1188 <main+0x58>
nopl   0x0(%rax,%rax,1)
add    $0x1,%esi
cmp    $0x65,%esi
je     11ed <main+0xbd>
mov    %esi,%edx
mov    %rdx,%rcx
imul   %r11,%rcx
shr    $0x21,%rcx
lea    (%rcx,%rcx,2),%ecx
mov    %edi,%eax
sub    %ecx,%eax
add    %esi,%eax
jne    1180 <main+0x50>
mov    %rdx,%rax
imul   %r8,%rax
shr    $0x22,%rax
lea    (%rax,%rax,4),%eax
mov    %r10d,%ecx
sub    %eax,%ecx
add    %esi,%ecx
jne    1180 <main+0x50>
imul   $0x24924925,%rdx,%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    1180 <main+0x50>
lea    0xe23(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11f9 <main+0xc9>
lea    0xe17(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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