#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 */
scalar_t__ EOF;
scalar_t__ fmod(double, int);
scalar_t__ is_unique(double *, int, double);
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, double *);
int main() {
  double arr[64], sum = 0, tmp = 0;
  int count = 0, i = 0;
  while (scanf("%lf", &tmp) != EOF) {
    if (is_unique(arr, i, tmp)) {
      arr[i] = tmp;
      count++;
      i++;
    }
  }
  i = 0;
  while (i < count) {
    sum += fmod(arr[i], count);
    i++;
  }
  printf("%d\n", count);
  printf("%.3lf\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x218(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x220(%rbp)
ff
movl   $0x0,-0x224(%rbp)
movl   $0x0,-0x228(%rbp)
lea    0xe7d(%rip),%rdi
lea    -0x220(%rbp),%rsi
call   1060 <scanf@plt>
mov    0x2e52(%rip),%rcx
cmp    (%rcx),%rax
je     11fe <main+0xbe>
lea    -0x210(%rbp),%rdi
mov    -0x228(%rbp),%esi
movsd  -0x220(%rbp),%xmm0
ff
call   1030 <is_unique@plt>
cmp    $0x0,%rax
je     11f9 <main+0xb9>
movsd  -0x220(%rbp),%xmm0
ff
movslq -0x228(%rbp),%rax
movsd  %xmm0,-0x210(%rbp,%rax,8)
ff ff
mov    -0x224(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x224(%rbp)
mov    -0x228(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x228(%rbp)
jmp    117c <main+0x3c>
movl   $0x0,-0x228(%rbp)
mov    -0x228(%rbp),%eax
cmp    -0x224(%rbp),%eax
jge    125e <main+0x11e>
movslq -0x228(%rbp),%rax
movsd  -0x210(%rbp,%rax,8),%xmm0
ff ff
mov    -0x224(%rbp),%edi
call   1050 <fmod@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x218(%rbp),%xmm0
ff
movsd  %xmm0,-0x218(%rbp)
ff
mov    -0x228(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x228(%rbp)
jmp    1208 <main+0xc8>
cvtsi2sdl -0x224(%rbp),%xmm0
ff
lea    0xd97(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x218(%rbp),%xmm0
ff
lea    0xd87(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x218,%rsp
movq   $0x0,0x8(%rsp)
lea    0xe9f(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x2e76(%rip),%r13
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
xor    %ebx,%ebx
cmp    0x0(%r13),%rax
je     1226 <main+0xe6>
xor    %ebp,%ebp
lea    0x10(%rsp),%r14
lea    0xe6c(%rip),%r15
lea    0x8(%rsp),%r12
xor    %ebx,%ebx
jmp    11b1 <main+0x71>
nopl   (%rax)
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
cmp    0x0(%r13),%rax
je     11dd <main+0x9d>
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <is_unique@plt>
test   %rax,%rax
je     11a0 <main+0x60>
movsd  0x8(%rsp),%xmm0
movslq %ebp,%rax
movsd  %xmm0,0x10(%rsp,%rax,8)
add    $0x1,%ebx
add    $0x1,%ebp
jmp    11a0 <main+0x60>
test   %ebx,%ebx
jle    1226 <main+0xe6>
mov    %ebx,%r14d
xorps  %xmm0,%xmm0
xor    %ebp,%ebp
nopl   0x0(%rax)
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp,%rbp,8),%xmm0
mov    %ebx,%edi
call   1050 <fmod@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
add    $0x1,%rbp
cmp    %rbp,%r14
jne    11f0 <main+0xb0>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
lea    0xdd0(%rip),%rdi
call   1040 <printf@plt>
lea    0xdc8(%rip),%rdi
movsd  (%rsp),%xmm0
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x218,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca [64 x double]
%2 = alloca double
%3 = bitcast [64 x double]* %1 to i8*
%4 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%5 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %42, label %8
8: ; preds = %0
%9 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 0
br label %14
10: ; preds = %26
%11 = icmp sgt i32 %27, 0
br i1 %11, label %12, label %42
12: ; preds = %10
%13 = zext i32 %27 to i64
br label %32
14: ; preds = %8, %26
%15 = phi i32 [ 0, %8 ], [ %28, %26 ]
%16 = phi i32 [ 0, %8 ], [ %27, %26 ]
%17 = load double, double* %2
%18 = call i64 @is_unique(double* %9, i32 %15, double %17)
%19 = icmp eq i64 %18, 0
br i1 %19, label %26, label %20
20: ; preds = %14
%21 = load double, double* %2
%22 = sext i32 %15 to i64
%23 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 %22
store double %21, double* %23
%24 = add nsw i32 %16, 1
%25 = add nsw i32 %15, 1
br label %26
26: ; preds = %20, %14
%27 = phi i32 [ %24, %20 ], [ %16, %14 ]
%28 = phi i32 [ %25, %20 ], [ %15, %14 ]
%29 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%30 = load i64, i64* @EOF
%31 = icmp eq i64 %29, %30
br i1 %31, label %10, label %14
32: ; preds = %12, %32
%33 = phi i64 [ 0, %12 ], [ %40, %32 ]
%34 = phi double [ 0.000000e+00, %12 ], [ %39, %32 ]
%35 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 %33
%36 = load double, double* %35
%37 = call i64 @fmod(double %36, i32 %27)
%38 = sitofp i64 %37 to double
%39 = fadd double %34, %38
%40 = add nuw nsw i64 %33, 1
%41 = icmp eq i64 %40, %13
br i1 %41, label %42, label %32
42: ; preds = %32, %0, %10
%43 = phi i32 [ %27, %10 ], [ 0, %0 ], [ %27, %32 ]
%44 = phi double [ 0.000000e+00, %10 ], [ 0.000000e+00, %0 ], [ %39, %32 ]
%45 = sitofp i32 %43 to double
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %45)
%47 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %44)
ret i32 0
}