#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 main() {
  int n;
  scanf("%d", &n);
  int min_sum = 0, sec_sum = 0;
  while (n-- > 0) {
    int m, s;
    scanf("%d %d", &m, &s);
    min_sum += m;
    sec_sum += s;
  }
  double sl_min = sec_sum / 60.0 / min_sum;
  if (sl_min <= 1.0)
    printf("measurement error\n");
  else
    printf("%.9f\n", sl_min);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xedd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    1190 <main+0x70>
lea    0xea6(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114f <main+0x2f>
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xe6b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe49(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     11d5 <main+0xb5>
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e8 <main+0xc8>
movsd  -0x20(%rbp),%xmm0
lea    0xe48(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x4(%rsp)
test   %eax,%eax
jle    11b1 <main+0x81>
lea    0xeab(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
xor    %ebp,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
add    0xc(%rsp),%ebp
add    0x8(%rsp),%ebx
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x4(%rsp)
test   %eax,%eax
jg     1180 <main+0x50>
cvtsi2sd %ebx,%xmm0
cvtsi2sd %ebp,%xmm1
jmp    11b9 <main+0x89>
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
divsd  0xe3f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe3b(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11e3 <main+0xb3>
lea    0xe3c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    11ef <main+0xbf>
lea    0xe32(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [19 x i8] c"measurement error\0A\00"
@.str.3 = [6 x i8] c"%.9f\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 double
store i32 0, i32* %1
%8 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
store i32 0, i32* %4
br label %9
9: ; preds = %13, %0
%10 = load i32, i32* %2
%11 = add nsw i32 %10, -1
store i32 %11, i32* %2
%12 = icmp sgt i32 %10, 0
br i1 %12, label %13, label %21
13: ; preds = %9
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %5, i32* %6)
%15 = load i32, i32* %5
%16 = load i32, i32* %3
%17 = add nsw i32 %16, %15
store i32 %17, i32* %3
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = add nsw i32 %19, %18
store i32 %20, i32* %4
br label %9
21: ; preds = %9
%22 = load i32, i32* %4
%23 = sitofp i32 %22 to double
%24 = fdiv double %23, 6.000000e+01
%25 = load i32, i32* %3
%26 = sitofp i32 %25 to double
%27 = fdiv double %24, %26
store double %27, double* %7
%28 = load double, double* %7
%29 = fcmp ole double %28, 1.000000e+00
br i1 %29, label %30, label %32
30: ; preds = %21
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %35
32: ; preds = %21
%33 = load double, double* %7
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %33)
br label %35
35: ; preds = %32, %30
%36 = load i32, i32* %1
ret i32 %36
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.3 = [6 x i8] c"%.9f\0A\00"
@str = [18 x i8] c"measurement error\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %26
9: ; preds = %0
%10 = bitcast i32* %2 to i8*
%11 = bitcast i32* %3 to i8*
br label %12
12: ; preds = %9, %12
%13 = phi i32 [ 0, %9 ], [ %17, %12 ]
%14 = phi i32 [ 0, %9 ], [ %19, %12 ]
%15 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%16 = load i32, i32* %2
%17 = add nsw i32 %16, %13
%18 = load i32, i32* %3
%19 = add nsw i32 %18, %14
%20 = load i32, i32* %1
%21 = add nsw i32 %20, -1
store i32 %21, i32* %1
%22 = icmp sgt i32 %20, 0
br i1 %22, label %12, label %23
23: ; preds = %12
%24 = sitofp i32 %19 to double
%25 = sitofp i32 %17 to double
br label %26
26: ; preds = %23, %0
%27 = phi double [ 0.000000e+00, %0 ], [ %24, %23 ]
%28 = phi double [ 0.000000e+00, %0 ], [ %25, %23 ]
%29 = fdiv double %27, 6.000000e+01
%30 = fdiv double %29, %28
%31 = fcmp ugt double %30, 1.000000e+00
br i1 %31, label %34, label %32
32: ; preds = %26
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %36
34: ; preds = %26
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %30)
br label %36
36: ; preds = %34, %32
ret i32 0
}