#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 EXIT_SUCCESS;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int /*<<< orphan*/ stdin;
int main(void) {
  int n, price1[1000], price2[1000];
  printf("½Ð¿é¤J¦³´X¦æ¼Æ­È¡G");
  fflush(stdin);
  scanf("%d", &n);
  int i, j, price[1000];
  for (i = 1; i <= n; i++) {
    scanf("%d %d", &price1[i], &price2[i]);
    for (j = price1[i]; j <= price2[i]; j++)
      price[i] += j * j;
  }
  for (i = 1; i <= n; i++) {
    if (price1[i] < price2[i])
      printf("%d\n", price[i]);
    else
      printf("¿é¤J¿ù»~\n");
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f00,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x1,-0x1f54(%rbp)
mov    -0x1f54(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     123e <main+0x10e>
movslq -0x1f54(%rbp),%rax
lea    -0xfb0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
movslq -0x1f54(%rbp),%rax
lea    -0x1f50(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
movslq -0x1f54(%rbp),%rax
mov    -0xfb0(%rbp,%rax,4),%eax
mov    %eax,-0x1f58(%rbp)
mov    -0x1f58(%rbp),%eax
movslq -0x1f54(%rbp),%rcx
cmp    -0x1f50(%rbp,%rcx,4),%eax
jg     1225 <main+0xf5>
mov    -0x1f58(%rbp),%ecx
imul   -0x1f58(%rbp),%ecx
movslq -0x1f54(%rbp),%rax
add    -0x2f00(%rbp,%rax,4),%ecx
mov    %ecx,-0x2f00(%rbp,%rax,4)
mov    -0x1f58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f58(%rbp)
jmp    11d5 <main+0xa5>
jmp    122a <main+0xfa>
mov    -0x1f54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f54(%rbp)
jmp    117a <main+0x4a>
movl   $0x1,-0x1f54(%rbp)
mov    -0x1f54(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     12c1 <main+0x191>
movslq -0x1f54(%rbp),%rax
mov    -0xfb0(%rbp,%rax,4),%eax
movslq -0x1f54(%rbp),%rcx
cmp    -0x1f50(%rbp,%rcx,4),%eax
jge    129a <main+0x16a>
movslq -0x1f54(%rbp),%rax
mov    -0x2f00(%rbp,%rax,4),%esi
lea    0xd9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12a8 <main+0x178>
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ad <main+0x17d>
mov    -0x1f54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f54(%rbp)
jmp    1248 <main+0x118>
mov    0x2d10(%rip),%rax
mov    (%rax),%eax
add    $0x2f00,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x2ef0,%rsp
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    0xeb6(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1296 <main+0x156>
mov    $0x1,%ebx
lea    0xe90(%rip),%r14
jmp    11b5 <main+0x75>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1(%rbx),%rcx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
mov    %rcx,%rbx
jge    1242 <main+0x102>
lea    (%rsp,%rbx,4),%rsi
add    $0x1f50,%rsi
lea    (%rsp,%rbx,4),%rdx
add    $0xfb0,%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x1f50(%rsp,%rbx,4),%edi
mov    0xfb0(%rsp,%rbx,4),%ecx
mov    %ecx,%esi
sub    %edi,%esi
jl     11a0 <main+0x60>
mov    %edi,%eax
imul   %edi,%eax
lea    0x2(%rdi),%r9d
imul   %edi,%r9d
add    $0x1,%r9d
imul   %esi,%r9d
lea    (%rdi,%rdi,1),%r8d
add    $0x3,%r8d
not    %edi
add    %edi,%ecx
mov    %rcx,%rdi
imul   %rsi,%rdi
shr    %rdi
imul   %r8d,%edi
mov    %esi,%edx
add    $0xfffffffe,%edx
imul   %rcx,%rdx
imul   %rsi,%rdx
shr    %rdx
imul   $0x55555556,%edx,%ecx
add    0x10(%rsp,%rbx,4),%eax
add    %r9d,%eax
add    %edi,%eax
add    %ecx,%eax
mov    %eax,0x10(%rsp,%rbx,4)
jmp    11a0 <main+0x60>
test   %eax,%eax
jle    1296 <main+0x156>
lea    0xddb(%rip),%r14
lea    0xdd8(%rip),%r15
xor    %ebx,%ebx
jmp    1276 <main+0x136>
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1030 <puts@plt>
movslq 0xc(%rsp),%rax
add    $0x1,%rbx
cmp    %rax,%rbx
jge    1296 <main+0x156>
mov    0x1f54(%rsp,%rbx,4),%eax
cmp    0xfb4(%rsp,%rbx,4),%eax
jge    1260 <main+0x120>
mov    0x14(%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1268 <main+0x128>
mov    0x2d3b(%rip),%rax
mov    (%rax),%eax
add    $0x2ef0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [34 x i8] c"\C2\BD\C3\90\C2\BF\C3\A9\C2\A4J\C2\A6\C2\B3\C2\B4X\C2\A6\C3\A6\C2\BC\C3\86\C2\AD\C3\88\C2\A1G\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [6 x i8] c"%d %d\00"
@.str.3 = [4 x i8] c"%d\0A\00"
@.str.4 = [16 x i8] c"\C2\BF\C3\A9\C2\A4J\C2\BF\C3\B9\C2\BB~\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i32]
%4 = alloca [1000 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca [1000 x i32]
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stdin
%10 = call i32 @fflush(i32 %9)
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
store i32 1, i32* %5
br label %12
12: ; preds = %48, %0
%13 = load i32, i32* %5
%14 = load i32, i32* %2
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %51
16: ; preds = %12
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %18
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %21
%23 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %19, i32* %22)
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %25
%27 = load i32, i32* %26
store i32 %27, i32* %6
br label %28
28: ; preds = %44, %16
%29 = load i32, i32* %6
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = icmp sle i32 %29, %33
br i1 %34, label %35, label %47
35: ; preds = %28
%36 = load i32, i32* %6
%37 = load i32, i32* %6
%38 = mul nsw i32 %36, %37
%39 = load i32, i32* %5
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = add nsw i32 %42, %38
store i32 %43, i32* %41
br label %44
44: ; preds = %35
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %28
47: ; preds = %28
br label %48
48: ; preds = %47
%49 = load i32, i32* %5
%50 = add nsw i32 %49, 1
store i32 %50, i32* %5
br label %12
51: ; preds = %12
store i32 1, i32* %5
br label %52
52: ; preds = %75, %51
%53 = load i32, i32* %5
%54 = load i32, i32* %2
%55 = icmp sle i32 %53, %54
br i1 %55, label %56, label %78
56: ; preds = %52
%57 = load i32, i32* %5
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = load i32, i32* %5
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %62
%64 = load i32, i32* %63
%65 = icmp slt i32 %60, %64
br i1 %65, label %66, label %72
66: ; preds = %56
%67 = load i32, i32* %5
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %70)
br label %74
72: ; preds = %56
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %74
74: ; preds = %72, %66
br label %75
75: ; preds = %74
%76 = load i32, i32* %5
%77 = add nsw i32 %76, 1
store i32 %77, i32* %5
br label %52
78: ; preds = %52
%79 = load i32, i32* @EXIT_SUCCESS
ret i32 %79
}

LLVM IR (-O2):
@.str = [34 x i8] c"\C2\BD\C3\90\C2\BF\C3\A9\C2\A4J\C2\A6\C2\B3\C2\B4X\C2\A6\C3\A6\C2\BC\C3\86\C2\AD\C3\88\C2\A1G\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [6 x i8] c"%d %d\00"
@.str.3 = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [15 x i8] c"\C2\BF\C3\A9\C2\A4J\C2\BF\C3\B9\C2\BB~\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i32]
%3 = alloca [1000 x i32]
%4 = alloca [1000 x i32]
%5 = bitcast i32* %1 to i8*
%6 = bitcast [1000 x i32]* %2 to i8*
%7 = bitcast [1000 x i32]* %3 to i8*
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stdin
%10 = tail call i32 @fflush(i32 %9)
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%12 = bitcast [1000 x i32]* %4 to i8*
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 1
br i1 %14, label %79, label %17
15: ; preds = %56
%16 = icmp slt i32 %58, 1
br i1 %16, label %79, label %61
17: ; preds = %0, %56
%18 = phi i64 [ %57, %56 ], [ 1, %0 ]
%19 = getelementptr inbounds [1000 x i32], [1000 x i32]* %2, i64 0, i64 %18
%20 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %18
%21 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %19, i32* %20)
%22 = load i32, i32* %19
%23 = load i32, i32* %20
%24 = icmp slt i32 %23, %22
br i1 %24, label %56, label %25
25: ; preds = %17
%26 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %18
%27 = load i32, i32* %26
%28 = mul i32 %22, %22
%29 = sub i32 %23, %22
%30 = add i32 %22, 2
%31 = mul i32 %22, %30
%32 = add i32 %31, 1
%33 = mul i32 %29, %32
%34 = shl i32 %22, 1
%35 = add i32 %34, 3
%36 = xor i32 %22, -1
%37 = add i32 %23, %36
%38 = zext i32 %37 to i33
%39 = zext i32 %29 to i33
%40 = mul i33 %38, %39
%41 = lshr i33 %40, 1
%42 = trunc i33 %41 to i32
%43 = mul i32 %35, %42
%44 = add i32 %23, -2
%45 = sub i32 %44, %22
%46 = zext i32 %45 to i33
%47 = mul i33 %38, %46
%48 = mul i33 %47, %39
%49 = lshr i33 %48, 1
%50 = trunc i33 %49 to i32
%51 = mul i32 %50, 1431655766
%52 = add i32 %27, %28
%53 = add i32 %52, %33
%54 = add i32 %53, %43
%55 = add i32 %54, %51
store i32 %55, i32* %26
br label %56
56: ; preds = %25, %17
%57 = add nuw nsw i64 %18, 1
%58 = load i32, i32* %1
%59 = sext i32 %58 to i64
%60 = icmp slt i64 %18, %59
br i1 %60, label %17, label %15
61: ; preds = %15, %74
%62 = phi i64 [ %75, %74 ], [ 1, %15 ]
%63 = getelementptr inbounds [1000 x i32], [1000 x i32]* %2, i64 0, i64 %62
%64 = load i32, i32* %63
%65 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %62
%66 = load i32, i32* %65
%67 = icmp slt i32 %64, %66
br i1 %67, label %68, label %72
68: ; preds = %61
%69 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %62
%70 = load i32, i32* %69
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %70)
br label %74
72: ; preds = %61
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
br label %74
74: ; preds = %68, %72
%75 = add nuw nsw i64 %62, 1
%76 = load i32, i32* %1
%77 = sext i32 %76 to i64
%78 = icmp slt i64 %62, %77
br i1 %78, label %61, label %79
79: ; preds = %74, %0, %15
%80 = load i32, i32* @EXIT_SUCCESS
ret i32 %80
}