#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 a, b, c, k;
  scanf("%d%d%d", &a, &b, &c);
  for (k = 10; k <= 100; k++) {
    if ((k - a) % 3 == 0 && (k - b) % 5 == 0 && (k - c) % 7 == 0) {
      printf("%d\n", k);
      break;
    }
  }
  if (k > 100) {
    printf("No answer\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movl   $0xa,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jg     11c6 <main+0xa6>
mov    -0x14(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b3 <main+0x93>
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b3 <main+0x93>
mov    -0x14(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b3 <main+0x93>
mov    -0x14(%rbp),%esi
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c6 <main+0xa6>
jmp    11b8 <main+0x98>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114e <main+0x2e>
cmpl   $0x64,-0x14(%rbp)
jle    11de <main+0xbe>
lea    0xe34(%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    %eax,%eax
sub    0xc(%rsp),%eax
xor    %ecx,%ecx
sub    0x10(%rsp),%ecx
xor    %edx,%edx
sub    0x14(%rsp),%edx
mov    $0xa,%esi
jmp    1178 <main+0x48>
nopl   0x0(%rax,%rax,1)
add    $0x1,%esi
cmp    $0x65,%esi
je     11cd <main+0x9d>
lea    (%rdx,%rsi,1),%edi
imul   $0xaaaaaaab,%edi,%edi
add    $0x2aaaaaaa,%edi
cmp    $0x55555554,%edi
ja     1170 <main+0x40>
lea    (%rcx,%rsi,1),%edi
imul   $0xcccccccd,%edi,%edi
add    $0x19999999,%edi
cmp    $0x33333332,%edi
ja     1170 <main+0x40>
lea    (%rax,%rsi,1),%edi
imul   $0xb6db6db7,%edi,%edi
add    $0x12492492,%edi
cmp    $0x24924925,%edi
jae    1170 <main+0x40>
lea    0xe43(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11d9 <main+0xa9>
lea    0xe37(%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 = [4 x i8] c"%d\0A\00"
@.str.2 = [11 x i8] c"No answer\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
store i32 10, i32* %5
br label %7
7: ; preds = %32, %0
%8 = load i32, i32* %5
%9 = icmp sle i32 %8, 100
br i1 %9, label %10, label %35
10: ; preds = %7
%11 = load i32, i32* %5
%12 = load i32, i32* %2
%13 = sub nsw i32 %11, %12
%14 = srem i32 %13, 3
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %31
16: ; preds = %10
%17 = load i32, i32* %5
%18 = load i32, i32* %3
%19 = sub nsw i32 %17, %18
%20 = srem i32 %19, 5
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %31
22: ; preds = %16
%23 = load i32, i32* %5
%24 = load i32, i32* %4
%25 = sub nsw i32 %23, %24
%26 = srem i32 %25, 7
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %22
%29 = load i32, i32* %5
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %29)
br label %35
31: ; preds = %22, %16, %10
br label %32
32: ; preds = %31
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
br label %7
35: ; preds = %28, %7
%36 = load i32, i32* %5
%37 = icmp sgt i32 %36, 100
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
ret i32 0
}

LLVM IR (-O2):
@.str = [7 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() {
%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, %24
%12 = phi i32 [ 10, %0 ], [ %25, %24 ]
%13 = sub nsw i32 %12, %8
%14 = srem i32 %13, 3
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %24
16: ; preds = %11
%17 = sub nsw i32 %12, %9
%18 = srem i32 %17, 5
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %16
%21 = sub nsw i32 %12, %10
%22 = srem i32 %21, 7
%23 = icmp eq i32 %22, 0
br i1 %23, label %27, label %24
24: ; preds = %11, %16, %20
%25 = add nuw nsw i32 %12, 1
%26 = icmp eq i32 %25, 101
br i1 %26, label %29, label %11
27: ; preds = %20
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %31
29: ; preds = %24
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %31
31: ; preds = %27, %29
ret i32 0
}