buggy_code
stringlengths 11
625k
| fixed_code
stringlengths 17
625k
| bug_type
stringlengths 2
4.45k
| language
int64 0
8
| token_count
int64 5
200k
|
|---|---|---|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
unicode_literals)
from sys import stdin
def prime(n):
L = list(range(2, n))
P = []
while L[0] ** 2 < n:
P.append(L[0])
L = [i for i in L if i % P[-1]]
return P + L
ps = prime(50030)
for line in stdin:
n = int(line)
for p in ps:
if n < p:
upper = p
break
under = p
print(under, upper)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
unicode_literals)
from sys import stdin
def prime(n):
L = list(range(2, n))
P = []
while L[0] ** 2 < n:
P.append(L[0])
L = [i for i in L if i % P[-1]]
return P + L
ps = prime(50030)
for line in stdin:
n = int(line)
for p in ps:
if n < p:
upper = p
break
if p < n:
under = p
print(under, upper)
|
[["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 102]]
| 5
| 119
|
from bisect import *
def sieve(n):
a = list(range(n))
a[:2] = None, None
for i in range(2, n):
if i ** 2 >= n: break
if not a[i]: continue
for i in range(i ** 2, n, i):
a[i] = None
return [v for v in a if v]
try:
a = sieve(9000)
while True:
n = int(input())
i = bisect_right(a, n)
print(a[i - (2 if a[i - 1] == n else 1)], a[i])
except EOFError:
pass
|
from bisect import *
def sieve(n):
a = list(range(n))
a[:2] = None, None
for i in range(2, n):
if i ** 2 >= n: break
if not a[i]: continue
for i in range(i ** 2, n, i):
a[i] = None
return [v for v in a if v]
try:
a = sieve(90000)
while True:
n = int(input())
i = bisect_right(a, n)
print(a[i - (2 if a[i - 1] == n else 1)], a[i])
except EOFError:
pass
|
[["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612]]
| 5
| 142
|
t = s = 0, i = require("fs").readFileSync("/dev/stdin", "utf8").split(/\s|,/);
for (a = j = i.length - 1; j--;)
s += (b = +i[j--]), t += b * i[j];
console.log(t + '\n' + ~~(s / (a * 2) + 0.5))
|
t = s = 0, i = require("fs").readFileSync("/dev/stdin", "utf8").split(/\s|,/);
for (a = j = i.length - 1; j--;)
s += (b = +i[j--]), t += b * i[j];
console.log(t + '\n' + ~~(s / (a / 2) + 0.5))
|
[["-", 0, 16, 31, 16, 12, 23, 0, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 85]]
| 2
| 95
|
t = s = 0, i = require("fs").readFileSync("/dev/stdin", "utf8").split(/\s|,/);
for (a = j = i.length - 1; j--;)
s += (b = +i[j--]), t += b * i[j];
console.log(t + '\n' + ~~(s / (a * 2) + 0.5))
|
t = s = 0, i = require("fs").readFileSync("/dev/stdin", "utf8").split(/\s|,/);
for (a = j = i.length - 1; j--;)
s += (b = +i[j--]), t += b * i[j];
console.log(t + '\n' + ~~(s / a * 2 + 0.5))
|
[["-", 28, 23, 0, 16, 31, 16, 12, 23, 0, 24], ["-", 28, 23, 0, 16, 31, 16, 12, 23, 0, 25]]
| 2
| 95
|
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.trim().split('\n');
var nums = lines.map(function(
line) { return line.split(',').map(function(n) { return +n; }); });
var sum = nums.reduce(function(p, n) { return p + n[0] * n[1]; }, 0);
var qsum = nums.reduce(function(p, n) { return p + n[1]; }, 0);
console.log(sum, Math.round(qsum / nums.length));
|
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.trim().split('\n');
var nums = lines.map(function(
line) { return line.split(',').map(function(n) { return +n; }); });
var sum = nums.reduce(function(p, n) { return p + n[0] * n[1]; }, 0);
var qsum = nums.reduce(function(p, n) { return p + n[1]; }, 0);
console.log(sum);
console.log(Math.round(qsum / nums.length));
|
[["-", 0, 493, 0, 1, 0, 2, 3, 3, 0, 21], ["+", 0, 493, 0, 1, 0, 2, 3, 3, 0, 25], ["+", 36, 36, 36, 36, 0, 493, 0, 1, 0, 35], ["+", 0, 493, 0, 1, 0, 2, 63, 558, 500, 22], ["+", 0, 493, 0, 1, 0, 2, 63, 558, 0, 131], ["+", 0, 493, 0, 1, 0, 2, 63, 558, 559, 560], ["+", 0, 493, 0, 1, 0, 2, 3, 3, 0, 24]]
| 2
| 153
|
<?php
$data = array();
while ($line = trim(scanf(STDIN))) {
list($p, $n) = explode(',', $line);
$data[] = array($p, $n);
}
$sum = 0;
$avg = 0;
foreach ($data as $d) {
$sum += $d[0] * $d[1];
$avg += $d[1];
}
echo $sum . "\n";
echo round($avg / count($data)) . "\n";
|
<?php
$data = array();
while ($line = trim(fgets(STDIN))) {
list($p, $n) = explode(',', $line);
$data[] = array($p, $n);
}
$sum = 0;
$avg = 0;
foreach ($data as $d) {
$sum += $d[0] * $d[1];
$avg += $d[1];
}
echo $sum . "\n";
echo round($avg / count($data)) . "\n";
|
[["-", 12, 613, 3, 3, 0, 28, 0, 613, 63, 141], ["+", 12, 613, 3, 3, 0, 28, 0, 613, 63, 141]]
| 6
| 125
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long cnt = 0;
long sum1 = 0;
long sum2 = 0;
while (sc.hasNext()) {
String[] s = sc.nextLine().split(",");
cnt++;
int a = Integer.parseInt(s[0]);
int b = Integer.parseInt(s[1]);
sum1 += a * b;
sum2 += b;
}
sc.close();
long mean = (long)Math.round((double)sum2 / cnt);
System.out.printf("%d %d\n", sum1, mean);
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long cnt = 0;
long sum1 = 0;
long sum2 = 0;
while (sc.hasNext()) {
String[] s = sc.nextLine().split(",");
cnt++;
int a = Integer.parseInt(s[0]);
int b = Integer.parseInt(s[1]);
sum1 += a * b;
sum2 += b;
}
sc.close();
long mean = (long)Math.round((double)sum2 / cnt);
System.out.printf("%d\n%d\n", sum1, mean);
}
}
|
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 44]]
| 3
| 157
|
import java.util.Scanner;
class Main {
public static void main(String[] args) {
String[] str = new String[2];
int sum = 0, ave = 0, count = 0, n, m;
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
str = sc.nextLine().split(",");
n = Integer.valueOf(str[0]);
m = Integer.valueOf(str[1]);
sum += n * m;
count++;
}
ave = (int)Math.round((double)sum / count);
System.out.println(sum);
System.out.println(ave);
}
}
|
import java.util.Scanner;
class Main {
public static void main(String[] args) {
String[] str = new String[2];
int sum = 0, ave = 0, count = 0, n, m;
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
str = sc.nextLine().split(",");
n = Integer.valueOf(str[0]);
m = Integer.valueOf(str[1]);
sum += n * m;
ave += m;
count++;
}
ave = (int)Math.round((double)ave / count);
System.out.println(sum);
System.out.println(ave);
}
}
|
[["+", 0, 52, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 17, 107], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 12, 22], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35], ["-", 51, 492, 3, 4, 0, 16, 31, 74, 51, 22], ["+", 51, 492, 3, 4, 0, 16, 31, 74, 51, 22]]
| 3
| 155
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
Scanner stdIn = null;
List<int[]> data = new ArrayList<int[]>();
try {
stdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
while (stdIn.hasNext()) {
String str = stdIn.next();
String[] s = str.split(",");
int[] temp = new int[2];
temp[0] = Integer.parseInt(s[0]);
temp[1] = Integer.parseInt(s[1]);
data.add(temp);
}
int sum = 0;
int num = 0;
for (int[] a : data) {
sum += a[0] * a[1];
num += a[1];
}
double ave = (double)num / data.size();
System.out.printf("%d %.0f%n", sum, ave);
} finally {
if (stdIn != null) {
stdIn.close();
}
}
}
}
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
Scanner stdIn = null;
List<int[]> data = new ArrayList<int[]>();
try {
stdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
while (stdIn.hasNext()) {
String str = stdIn.next();
String[] s = str.split(",");
int[] temp = new int[2];
temp[0] = Integer.parseInt(s[0]);
temp[1] = Integer.parseInt(s[1]);
data.add(temp);
}
int sum = 0;
int num = 0;
for (int[] a : data) {
sum += a[0] * a[1];
num += a[1];
}
double ave = (double)num / data.size();
System.out.printf("%d%n%.0f%n", sum, ave);
} finally {
if (stdIn != null) {
stdIn.close();
}
}
}
}
|
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
| 3
| 244
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
int total = 0, amount = 0, i, p, q;
i = 0;
while ((line = br.readLine()) != null) {
p = Integer.parseInt(line.substring(0, line.indexOf(',')));
q = Integer.parseInt(line.substring(line.charAt(',') + 1));
i++;
total += p * q;
amount += q;
}
System.out.println(total);
System.out.println(Math.round((double)amount / i));
}
}
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
int total = 0, amount = 0, i, p, q;
i = 0;
while ((line = br.readLine()) != null) {
p = Integer.parseInt(line.substring(0, line.indexOf(',')));
q = Integer.parseInt(line.substring(line.indexOf(',') + 1));
i++;
total += p * q;
amount += q;
}
System.out.println(total);
System.out.println((int)Math.round((double)amount / i));
}
}
|
[["-", 0, 492, 3, 4, 0, 16, 31, 492, 141, 22], ["+", 0, 492, 3, 4, 0, 16, 31, 492, 141, 22], ["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 24], ["+", 0, 492, 3, 4, 0, 74, 39, 506, 0, 507], ["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 25]]
| 3
| 179
|
#include <stdio.h>
int main(void) {
int a, b;
int sum, ave;
int i;
i = 0;
sum = 0;
ave = 0;
while (scanf("%d,%d", &a, &b) != EOF) {
sum += a * b;
ave += b;
i++;
}
printf("%d\n%d\n", (int)((double)sum, ave / i + 0.5));
return (0);
}
|
#include <stdio.h>
int main(void) {
int a, b;
int sum, ave;
int i;
i = 0;
sum = 0;
ave = 0;
while (scanf("%d,%d", &a, &b) != EOF) {
sum += a * b;
ave += b;
i++;
}
printf("%d\n%d\n", sum, (int)((double)ave / i + 0.5));
return (0);
}
|
[["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 74, 51, 23, 0, 34, 31, 74, 51, 22], ["-", 3, 4, 0, 74, 51, 23, 0, 34, 0, 21]]
| 0
| 97
|
#include <stdio.h>
int main() {
int s, a;
int sum = 0, ave = 0, n = 0;
while (scanf("%d,%d", &s, &a) != EOF) {
n++;
sum += s * a;
ave += a;
printf("%d\n%d\n", sum, (int)((float)ave / n + 0.5));
}
return 0;
}
|
#include <stdio.h>
int main() {
int s, a;
int sum = 0, ave = 0, n = 0;
while (scanf("%d,%d", &s, &a) != EOF) {
n++;
sum += s * a;
ave += a;
}
printf("%d\n%d\n", sum, (int)((float)ave / n + 0.5));
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 0
| 87
|
#include <stdio.h>
int main(void) {
int a, b, sum_a = 0, sum_b = 0, c = 0;
int syousuu = 0;
while (scanf("%d,%d", &a, &b) != EOF) {
sum_a += a * b;
sum_b += b;
c++;
}
if (sum_b % 1 != 0 && 2 * (sum_b % c) >= c) {
syousuu = 1;
}
printf("%d\n%d\n", sum_a, syousuu + sum_b / c);
return (0);
}
|
#include <stdio.h>
int main(void) {
int a, b, sum_a = 0, sum_b = 0, c = 0;
int syousuu = 0;
while (scanf("%d,%d", &a, &b) != EOF) {
sum_a += a * b;
sum_b += b;
c++;
}
if (sum_b % c != 0 && 2 * (sum_b % c) >= c) {
syousuu = 1;
}
printf("%d\n%d\n", sum_a, syousuu + sum_b / c);
return (0);
}
|
[["-", 15, 23, 0, 16, 31, 16, 31, 16, 12, 13], ["+", 15, 23, 0, 16, 31, 16, 31, 16, 12, 22]]
| 0
| 110
|
#include <stdio.h>
int main(void) {
int a, b, n = 0, suma = 0, sumb = 0, ave = 0;
while (scanf("%d, %d", &a, &b) != EOF) {
suma += a * b;
sumb += b;
n++;
ave = (double)sumb / (double)n;
}
printf("%d\n", suma);
printf("%d\n", ave);
return 0;
}
|
#include <stdio.h>
int main(void) {
int a, b, n = 0, suma = 0, sumb = 0, ave = 0;
while (scanf("%d, %d", &a, &b) != EOF) {
suma += a * b;
sumb += b;
n++;
}
ave = (double)sumb / (double)n + 0.5;
printf("%d\n", suma);
printf("%d\n", ave);
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 0
| 97
|
t, z, n;
main(p, c) {
for (; ~scanf("%d,%d\n", &p, &c); t += p * c, z += c, n++)
;
printf("%d\n%d\n", t, lround(z / n));
exit(0);
}
|
t, z, n;
main(p, c) {
for (; ~scanf("%d,%d\n", &p, &c); t += p * c, z += c, n++)
;
printf("%d\n%d\n", t, lround(1. * z / n));
exit(0);
}
|
[["+", 0, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 48]]
| 0
| 71
|
#include <stdio.h>
int main(int argc, const char *argv[]) {
int tanka, suryo, sum = 0, cnt = 0, sum1 = 0, ave = 0;
double syousu;
while (scanf("%d, %d", &tanka, &suryo) != EOF) {
sum += tanka * suryo;
sum1 += suryo;
cnt++;
}
ave = sum1 / cnt;
syousu = (double)sum1 / (double)cnt - (double)ave;
if (syousu >= 0.5) {
ave += 1;
}
printf("%d, %d\n", sum, ave);
return 0;
}
|
#include <stdio.h>
int main(int argc, const char *argv[]) {
int tanka, suryo, sum = 0, cnt = 0, sum1 = 0, ave = 0;
double syousu;
while (scanf("%d, %d", &tanka, &suryo) != EOF) {
sum += tanka * suryo;
sum1 += suryo;
cnt++;
}
ave = sum1 / cnt;
syousu = (double)sum1 / (double)cnt - (double)ave;
if (syousu >= 0.5) {
ave += 1;
}
printf("%d\n%d\n", sum, ave);
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 123
|
#include <stdio.h>
int main() {
int x = 0, y = 0, a = 0, b = 0, i = 0;
while (scanf("%d,%d", &x, &y) != EOF) {
a = a + x * y;
b = b + y;
i++;
}
printf("%d\n%d\n", a, b + 1 / i);
return 0;
}
|
#include <stdio.h>
int main() {
int x = 0, y = 0, a = 0, b = 0, i = 0;
while (scanf("%d,%d", &x, &y) != EOF) {
a = a + x * y;
b = b + y;
i++;
}
printf("%d\n%d\n", a, (b + 1) / i);
return 0;
}
|
[["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25]]
| 0
| 86
|
#include <stdio.h>
int main(void) {
int a, b, s, r, n;
char c;
s = r = n = 0;
while (scanf("%d%c%d\n", &a, &c, &b) == 3) {
s = s + a * b;
r = r + b;
n++;
}
printf("%d\n%d\n", s, (int)((0.5 + r) / n));
return 0;
}
|
#include <stdio.h>
int main(void) {
int a, b, s, r, n;
char c;
s = r = n = 0;
while (scanf("%d%c%d\n", &a, &c, &b) == 3) {
s = s + a * b;
r = r + b;
n++;
}
printf("%d\n%d\n", s, (int)((0.0 + r) / n + 0.5));
return 0;
}
|
[["-", 51, 23, 0, 16, 31, 23, 0, 16, 31, 13], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 74, 51, 23, 0, 16, 17, 72], ["+", 3, 4, 0, 74, 51, 23, 0, 16, 12, 13]]
| 0
| 99
|
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
int main() {
int a, b;
int sum = 0, ave = 0, cnt = 0;
while (scanf("%d,%d", &a, &b) != EOF) {
sum += a;
ave += b;
cnt++;
}
ave = ave * 10 / cnt;
if (ave % 10 >= 5)
ave += 10 - ave % 10;
cout << sum << "\n" << ave / 10 << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
int main() {
int a, b;
int sum = 0, ave = 0, cnt = 0;
while (scanf("%d,%d", &a, &b) != EOF) {
sum += a * b;
ave += b;
cnt++;
}
ave = ave * 10 / cnt;
if (ave % 10 >= 5)
ave += 10 - ave % 10;
cout << sum << "\n" << ave / 10 << endl;
}
|
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
| 1
| 116
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define CI cin >>
#define CO cout <<
#define E << endl;
using namespace std;
typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;
int N;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
string name;
int a, b, c, d;
int number[100005] = {0};
int h[100005] = {0};
int w[100005] = {0};
int max_count = 0;
void input(void) { CI N; }
int main(void) {
int cost = 0;
int num = 0;
int sum_c = 0;
int sum_n = 0;
int i = 0;
while (scanf("%d,%d", &cost, &num) != EOF) {
sum_c += cost;
sum_n += num;
i++;
}
CO sum_c E
CO(int)((double)sum_n / (double)i + 0.5) E
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define CI cin >>
#define CO cout <<
#define E << endl;
using namespace std;
typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;
int N;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
string name;
int a, b, c, d;
int number[100005] = {0};
int h[100005] = {0};
int w[100005] = {0};
int max_count = 0;
void input(void) { CI N; }
int main(void) {
int cost = 0;
int num = 0;
int sum_c = 0;
int sum_n = 0;
int i = 0;
while (scanf("%d,%d", &cost, &num) != EOF) {
sum_c += cost * num;
sum_n += num;
i++;
}
CO sum_c E
CO(int)((double)sum_n / (double)i + 0.5) E
return 0;
}
|
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
| 1
| 290
|
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int price, num;
int sum = 0;
int total_sum = 0;
int count = 0;
while (cin >> price >> num) {
sum += price * num;
total_sum += num;
count++;
}
double ave = 1.0 * total_sum / count;
printf("%d\n%d\n", sum, (int)(ave + 0.5));
// while(1);
return 0;
}
|
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int price, num;
int sum = 0;
int total_sum = 0;
int count = 0;
char temp;
while (cin >> price >> temp >> num) {
sum += price * num;
total_sum += num;
count++;
}
double ave = 1.0 * total_sum / count;
printf("%d\n%d\n", sum, (int)(ave + 0.5));
// while(1);
return 0;
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 17, 152], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 12, 22]]
| 1
| 115
|
ary = []
while tmp = gets
tmp = tmp.to_i
ary << tmp
end
puts ary.max - ary.min
|
ary = []
while tmp = gets
tmp = tmp.to_f
ary << tmp
end
puts (ary.max - ary.min)
|
[["-", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 739, 0, 24], ["+", 0, 493, 0, 652, 3, 4, 0, 739, 0, 25]]
| 4
| 25
|
a = $>.map(&:to_f)
p a.max - a.min
|
a = $<.map(&:to_f)
p a.max - a.min
|
[["-", 36, 36, 0, 493, 0, 662, 12, 652, 486, 744], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 486, 744]]
| 4
| 17
|
import sys
ms = []
try:
for v in sys.stdin:
ms.append(float(v))
except:
print(max(ms)-min(ms))
|
import sys
ms = []
for v in sys.stdin:
ms.append(float(v))
print(max(ms)-min(ms))
|
[["-", 36, 36, 36, 36, 0, 656, 0, 246, 0, 247], ["-", 36, 36, 36, 36, 0, 656, 0, 246, 0, 102], ["-", 36, 36, 0, 656, 0, 246, 0, 671, 0, 672], ["-", 36, 36, 0, 656, 0, 246, 0, 671, 0, 102]]
| 5
| 38
|
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
String ball = "A";
while (sc.hasNext()) {
String[] cup = sc.next().split(",");
if (ball.equals(cup[0])) {
ball = cup[1];
} else if (cup.equals(cup[1])) {
ball = cup[0];
}
}
System.out.println(ball);
} finally {
sc.close();
}
}
}
|
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
String ball = "A";
while (sc.hasNext()) {
String[] cup = sc.next().split(",");
if (ball.equals(cup[0])) {
ball = cup[1];
} else if (ball.equals(cup[1])) {
ball = cup[0];
}
}
System.out.println(ball);
} finally {
sc.close();
}
}
}
|
[["-", 0, 57, 75, 57, 15, 15, 0, 492, 500, 22], ["+", 0, 57, 75, 57, 15, 15, 0, 492, 500, 22]]
| 3
| 137
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String ans = "A";
String str = "";
while ((str = br.readLine()) != null) {
String[] sp = str.split(",");
if (ans.equals(sp[0])) {
ans = sp[0];
} else if (ans.equals(sp[1])) {
ans = sp[1];
}
}
System.out.println(ans);
}
}
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String ans = "A";
String str = "";
while ((str = br.readLine()) != null) {
String[] sp = str.split(",");
if (ans.equals(sp[0])) {
ans = sp[1];
} else if (ans.equals(sp[1])) {
ans = sp[0];
}
}
System.out.println(ans);
}
}
|
[["-", 64, 196, 0, 1, 0, 11, 12, 504, 71, 499], ["+", 64, 196, 0, 1, 0, 11, 12, 504, 71, 499]]
| 3
| 152
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char a = 0;
while (sc.hasNext()) {
char[] list = sc.nextLine().toCharArray();
char p1 = list[0];
char p2 = list[2];
if (p1 == a || p2 == a) {
if (p1 == a) {
a = p2;
} else {
a = p1;
}
}
}
System.out.println(a);
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char a = 'A';
while (sc.hasNext()) {
char[] list = sc.nextLine().toCharArray();
char p1 = list[0];
char p2 = list[2];
if (p1 == a || p2 == a) {
if (p1 == a) {
a = p2;
} else {
a = p1;
}
}
}
System.out.println(a);
}
}
|
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 252]]
| 3
| 121
|
import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc;
static final int INF = 1 << 28;
static final double EPS = 1e-9;
void run() {
sc = new Scanner(System.in);
char ans = 'A';
for (; sc.hasNext();) {
String s = sc.nextLine();
if (s.charAt(0) == ans)
ans = s.charAt(2);
if (s.charAt(2) == ans)
ans = s.charAt(0);
}
println("" + ans);
sc.close();
}
void print(String s) { System.out.print(s); }
void println(String s) { System.out.println(s); }
public static void main(String[] args) { new Main().run(); }
}
|
import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc;
static final int INF = 1 << 28;
static final double EPS = 1e-9;
void run() {
sc = new Scanner(System.in);
char ans = 'A';
for (; sc.hasNext();) {
String s = sc.nextLine();
if (s.charAt(0) == ans)
ans = s.charAt(2);
else if (s.charAt(2) == ans)
ans = s.charAt(0);
}
println("" + ans);
sc.close();
}
void print(String s) { System.out.print(s); }
void println(String s) { System.out.println(s); }
public static void main(String[] args) { new Main().run(); }
}
|
[["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95]]
| 3
| 223
|
import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.util.*;
// AOJ 0047
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int[] cup = {1, 0, 0};
while (sc.hasNextInt()) {
String[] ss = sc.next().split(",");
int i1 = new Integer(ss[0].charAt(0) - 'A'),
i2 = new Integer(ss[1].charAt(0) - 'A');
int tmp = cup[i1];
cup[i1] = cup[i2];
cup[i2] = tmp;
}
int idx = 0;
for (idx = 0;; idx++)
if (cup[idx] == 1)
break;
System.out.printf("%c", idx + 'A');
System.out.println();
}
}
|
import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.util.*;
// AOJ 0047
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int[] cup = {1, 0, 0};
while (sc.hasNext()) {
String[] ss = sc.next().split(",");
int i1 = new Integer(ss[0].charAt(0) - 'A'),
i2 = new Integer(ss[1].charAt(0) - 'A');
// System.out.println(i1 + " " + i2);
int tmp = cup[i1];
cup[i1] = cup[i2];
cup[i2] = tmp;
}
int idx = 0;
for (idx = 0;; idx++)
if (cup[idx] == 1)
break;
System.out.printf("%c", idx + 'A');
System.out.println();
}
}
|
[["-", 8, 196, 0, 52, 15, 15, 0, 492, 141, 22], ["+", 8, 196, 0, 52, 15, 15, 0, 492, 141, 22]]
| 3
| 209
|
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String buf;
double weight;
String cup = "A";
while ((buf = br.readLine()) != null) {
String[] str = buf.split(",");
if (cup.equals(str[0])) {
cup = str[1];
} else if (cup.equals(str[1])) {
cup = str[2];
}
}
System.out.println(cup);
}
}
|
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String buf;
double weight;
String cup = "A";
while ((buf = br.readLine()) != null) {
String[] str = buf.split(",");
if (cup.equals(str[0])) {
cup = str[1];
} else if (cup.equals(str[1])) {
cup = str[0];
}
}
System.out.println(cup);
}
}
|
[["-", 64, 196, 0, 1, 0, 11, 12, 504, 71, 499], ["+", 64, 196, 0, 1, 0, 11, 12, 504, 71, 499]]
| 3
| 136
|
import java.util.*;
public class Main {
public static void main(String[] args) { new Main().run(); }
Scanner sc = new Scanner(System.in);
void run() {
String ans = solve();
System.out.println(ans);
}
String solve() {
String ans = "A";
while (sc.hasNext()) {
String s = sc.next();
String l = s.substring(0, 1);
String r = s.substring(2, 3);
if (ans.equals(l))
ans = l;
else if (ans.equals(r))
ans = r;
}
return ans;
}
}
|
import java.util.*;
public class Main {
public static void main(String[] args) { new Main().run(); }
Scanner sc = new Scanner(System.in);
void run() {
String ans = solve();
System.out.println(ans);
}
String solve() {
String ans = "A";
while (sc.hasNext()) {
String s = sc.next();
String l = s.substring(0, 1);
String r = s.substring(2, 3);
if (ans.equals(l))
ans = r;
else if (ans.equals(r))
ans = l;
// System.out.println("*"+ans);
}
return ans;
}
}
|
[["-", 8, 196, 0, 57, 64, 1, 0, 11, 12, 22], ["+", 8, 196, 0, 57, 64, 1, 0, 11, 12, 22], ["-", 0, 57, 75, 57, 64, 1, 0, 11, 12, 22], ["+", 0, 57, 75, 57, 64, 1, 0, 11, 12, 22]]
| 3
| 152
|
#include <stdio.h>
int main() {
char cup1, cup2;
char ball;
ball = 'A';
while (scanf("%c,%c", &cup1, &cup2) != EOF) {
if (cup1 == ball)
ball = cup2;
else if (cup2 == ball)
ball = cup1;
printf("%c\n", ball);
}
return 0;
}
|
#include <stdio.h>
int main() {
char cup1, cup2;
char ball;
ball = 'A';
while (scanf("%c,%c", &cup1, &cup2) != EOF) {
if (cup1 == ball)
ball = cup2;
else if (cup2 == ball)
ball = cup1;
}
printf("%c\n", ball);
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 0
| 75
|
#include <stdio.h>
int main(void) {
char a[2];
char sign = 'A';
while (scanf("%c,%c", &a[0], &a[1]) != EOF) {
if (a[0] == sign)
sign = a[1];
if (a[1] == sign)
sign = a[0];
}
printf("%c\n", sign);
return 0;
}
|
#include <stdio.h>
int main(void) {
char a[2];
char sign = 'A';
while (scanf("%c,%c", &a[0], &a[1]) != EOF) {
if (a[0] == sign)
sign = a[1];
else if (a[1] == sign)
sign = a[0];
}
printf("%c\n", sign);
return 0;
}
|
[["+", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95]]
| 0
| 92
|
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char a = 'A';
char b, c;
while (scanf("%s,%s", &b, &c) != EOF) {
if (b == a) {
a = c;
} else if (c == a) {
a = b;
}
}
printf("%s\n", a);
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char a = 'A';
char b, c;
while (scanf("%c,%c", &b, &c) != EOF) {
if (b == a) {
a = c;
} else if (c == a) {
a = b;
}
}
printf("%c\n", a);
return 0;
}
|
[["-", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 80
|
#include <stdio.h>
main() {
char x, y, in;
in = 'A';
while (scanf("%c%c", &x, &y) != EOF) {
if (x == in)
in = y;
else if (y == in)
in = x;
}
printf("%c\n", in);
return 0;
}
|
#include <stdio.h>
main() {
char x, y, in;
in = 'A';
while (scanf("%c,%c", &x, &y) != EOF) {
if (x == in)
in = y;
else if (y == in)
in = x;
}
printf("%c\n", in);
return 0;
}
|
[["-", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 74
|
main() {
char s[4];
int cup[3] = {1, 0, 0}, i, j, t;
while (~scanf("%s", s)) {
i = s[0] - 'A', j = s[2] - 'A';
t = cup[i], cup[i] = cup[j], cup[j] = t;
}
for (i = 0; i < 2; i++)
cup[i] && printf("%c\n", 'A' + i);
exit(0);
}
|
main() {
char s[4];
int cup[3] = {1, 0, 0}, i, j, t;
while (~scanf("%s", s)) {
i = s[0] - 'A', j = s[2] - 'A';
t = cup[i], cup[i] = cup[j], cup[j] = t;
}
for (i = 0; i < 3; i++)
cup[i] && printf("%c\n", 'A' + i);
exit(0);
}
|
[["-", 0, 30, 0, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 30, 0, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 128
|
char a[9];
b = 65;
main() {
for (; read(0, a, 5);)
b = b - *a ? b - a[2] ? b : *a : a[2];
exit(!puts(&b));
}
|
char a[9];
b = 65;
main() {
for (; read(0, a, 4);)
b = b - *a ? b - a[2] ? b : *a : a[2];
exit(!puts(&b));
}
|
[["-", 0, 9, 0, 7, 15, 2, 3, 4, 0, 13], ["+", 0, 9, 0, 7, 15, 2, 3, 4, 0, 13]]
| 0
| 63
|
#include <stdio.h>
/** Application main entry point. */
int main(int argc, char *argv[]) {
int cup[] = {1, 0, 0};
char a, b;
int i;
while (scanf(" %c,%c", &a, &b) == 2) {
int tmp = cup[a - 'A'];
cup[a - 'A'] = cup[b - 'A'];
cup[a - 'A'] = tmp;
}
for (i = 0; !cup[i]; ++i)
;
printf("%c\n", i + 'A');
return (0);
}
|
#include <stdio.h>
/** Application main entry point. */
int main(int argc, char *argv[]) {
int cup[] = {1, 0, 0};
char a, b;
int i;
while (scanf(" %c,%c", &a, &b) == 2) {
int tmp = cup[a - 'A'];
cup[a - 'A'] = cup[b - 'A'];
cup[b - 'A'] = tmp;
}
for (i = 0; !cup[i]; ++i)
;
printf("%c\n", i + 'A');
return (0);
}
|
[["-", 0, 1, 0, 11, 31, 69, 71, 16, 31, 22], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 31, 22]]
| 0
| 133
|
main(x, a, b) {
for (x = 65; ~scanf("%c,%c\n", &a, &b);)
x = x == a ? b : x == b ? a : x;
printf("%c\n", x);
exit(0);
}
|
main(x) {
char a, b;
for (x = 65; ~scanf("%c,%c\n", &a, &b);)
x = x == a ? b : x == b ? a : x;
printf("%c\n", x);
exit(0);
}
|
[["-", 0, 30, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 36, 36, 0, 30, 0, 14, 49, 65, 0, 25], ["+", 36, 36, 0, 30, 0, 14, 8, 9, 0, 45], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 36, 36, 36, 36, 0, 30, 0, 9, 0, 45], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35]]
| 0
| 64
|
#include <stdio.h>
main() {
int c[3] = {1, 0, 0};
int temp, ch1, ch2, i;
char c1, c2;
while (scanf("%c,%c", &c1, &c2) != EOF) {
if (c1 == 'A') {
ch1 = 0;
} else if (c1 == 'B') {
ch1 = 1;
} else {
ch1 = 2;
}
if (c2 == 'A') {
ch2 = 0;
} else if (c2 == 'B') {
ch2 = 1;
} else {
ch2 = 2;
}
temp = c[ch1];
c[ch1] = c[ch2];
c[ch2] = temp;
}
for (i = 0; i < 3; i++) {
if (c[i] == 1) {
if (i == 0) {
printf("A\n");
} else if (i == 1) {
printf("B\n");
} else {
printf("C\n");
}
}
}
return 0;
}
|
#include <stdio.h>
main() {
int c[3] = {1, 0, 0};
int temp, ch1, ch2, i;
char c1, c2;
while (scanf(" %c , %c", &c1, &c2) != EOF) {
if (c1 == 'A') {
ch1 = 0;
} else if (c1 == 'B') {
ch1 = 1;
} else {
ch1 = 2;
}
if (c2 == 'A') {
ch2 = 0;
} else if (c2 == 'B') {
ch2 = 1;
} else {
ch2 = 2;
}
temp = c[ch1];
c[ch1] = c[ch2];
c[ch2] = temp;
}
for (i = 0; i < 3; i++) {
if (c[i] == 1) {
if (i == 0) {
printf("A\n");
} else if (i == 1) {
printf("B\n");
} else {
printf("C\n");
}
}
}
return 0;
}
|
[["-", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 224
|
s[], n = 65;
main() {
for (; gets(s) ? n = n - *s ? n - s[2] ? n : *s : s[2] : !puts(&n);)
;
}
|
char s[], n = 65;
main() {
for (; gets(s) ? n = n - *s ? n - s[2] ? n : *s : s[2] : !puts(&n);)
;
}
|
[["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 0, 1, 0, 69, 71, 11, 12, 13, 0, 73]]
| 0
| 56
|
n = 65;
main(s) {
for (; gets(&s) ? n = n - s >> 16 ? n - s & 255 ? n : s >> 16 : s & 255
: !puts(&n);)
;
}
|
n = 65;
main(s) {
for (; gets(&s) ? n = n - (s >> 16) ? n - (s & 255) ? n : s >> 16 : s & 255
: !puts(&n);)
;
}
|
[["+", 64, 11, 12, 41, 15, 16, 12, 23, 0, 24], ["+", 64, 11, 12, 41, 15, 16, 12, 23, 0, 25], ["+", 12, 41, 64, 41, 15, 16, 12, 23, 0, 24], ["+", 12, 41, 64, 41, 15, 16, 12, 23, 0, 25]]
| 0
| 52
|
n = 65;
main(s) {
for (; gets(&s) ? n = n != s >> 16 ? n != s & 67 ? n : s >> 16 : s & 67
: !puts(&n);)
;
}
|
n = 65;
main(s) {
for (; gets(&s) ? n = n != s >> 16 ? n - (s & 67) ? n : s >> 16 : s & 67
: !puts(&n);)
;
}
|
[["-", 12, 41, 64, 41, 15, 16, 31, 16, 17, 79], ["+", 64, 11, 12, 41, 64, 41, 15, 16, 17, 33], ["+", 12, 41, 64, 41, 15, 16, 12, 23, 0, 24], ["+", 12, 41, 64, 41, 15, 16, 12, 23, 0, 25]]
| 0
| 52
|
#include <stdio.h>
int main() {
char a, b, c = 'A';
while (scanf("%c,%c", &a, &b) != EOF) {
c = c == a ? b : c == b ? b : c;
}
printf("%c\n", c);
return 0;
}
|
#include <stdio.h>
int main() {
char a, b, c = 'A';
while (scanf("%c,%c", &a, &b) != EOF) {
c = c == a ? b : c == b ? a : c;
}
printf("%c\n", c);
return 0;
}
|
[["-", 0, 1, 0, 11, 12, 41, 75, 41, 64, 22], ["+", 0, 1, 0, 11, 12, 41, 75, 41, 64, 22]]
| 0
| 67
|
#include <stdio.h>
int main(void) {
int swap1, swap2, cup[3] = {1, 0, 0}, hoge;
char input1, input2;
while (scanf("%c,%c", &input1, &input2) != EOF) {
if (input1 == 'A')
swap1 = 0;
else if (input1 == 'B')
swap1 = 1;
else if (input1 == 'C')
swap1 = 2;
if (input2 == 'A')
swap2 = 0;
else if (input2 == 'B')
swap2 = 1;
else if (input2 == 'C')
swap2 = 2;
hoge = cup[swap1];
cup[swap1] = cup[swap2];
cup[swap2] = hoge;
}
if (cup[0] == 1)
printf("A\n");
else if (cup[1] == 1)
printf("B\n");
else if (cup[2] == 1)
printf("C\n");
return 0;
}
|
#include <stdio.h>
int main(void) {
int swap1, swap2, cup[3] = {1, 0, 0}, hoge;
char input1, input2;
while (scanf("%c,%c", &input1, &input2) != EOF) {
getchar();
if (input1 == 'A')
swap1 = 0;
else if (input1 == 'B')
swap1 = 1;
else if (input1 == 'C')
swap1 = 2;
if (input2 == 'A')
swap2 = 0;
else if (input2 == 'B')
swap2 = 1;
else if (input2 == 'C')
swap2 = 2;
hoge = cup[swap1];
cup[swap1] = cup[swap2];
cup[swap2] = hoge;
}
if (cup[0] == 1)
printf("A\n");
else if (cup[1] == 1)
printf("B\n");
else if (cup[2] == 1)
printf("C\n");
return 0;
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 0
| 209
|
#include <iostream>
using namespace std;
int main() {
int a = 1, b = 0, c = 0, tmp;
char x, y;
while (cin >> x >> y) {
if (x == 'A') {
if (y == 'B') {
tmp = a;
a = b;
b = tmp;
} else {
tmp = a;
a = c;
c = tmp;
}
} else if (x == 'B') {
if (y == 'A') {
tmp = a;
a = b;
b = tmp;
} else {
tmp = b;
b = c;
c = tmp;
}
} else {
if (y == 'A') {
tmp = a;
a = c;
c = tmp;
} else {
tmp = b;
b = c;
c = tmp;
}
}
}
if (a == 1) {
cout << "A" << endl;
} else if (b == 1) {
cout << "B" << endl;
} else {
cout << "C" << endl;
}
}
|
#include <iostream>
using namespace std;
int main() {
int a = 1, b = 0, c = 0, tmp;
char x, y, z;
while (cin >> x >> z >> y) {
if (x == 'A') {
if (y == 'B') {
tmp = a;
a = b;
b = tmp;
} else {
tmp = a;
a = c;
c = tmp;
}
} else if (x == 'B') {
if (y == 'A') {
tmp = a;
a = b;
b = tmp;
} else {
tmp = b;
b = c;
c = tmp;
}
} else {
if (y == 'A') {
tmp = a;
a = c;
c = tmp;
} else {
tmp = b;
b = c;
c = tmp;
}
}
}
if (a == 1) {
cout << "A" << endl;
} else if (b == 1) {
cout << "B" << endl;
} else {
cout << "C" << endl;
}
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 17, 152], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 12, 22]]
| 1
| 221
|
$table = [
48.0 => "light fly",
51.0 => "fly",
54.0 => "bantam",
57.0 => "feather",
60.0 => "light",
64.0 => "light welter",
69.0 => "welter",
75.0 => "light middle",
81.0 => "middle",
91.0 => "light heavy",
PHP_INT_MAX => "heavy",
];
main();
function main() {
while ($line = trim(fgets(STDIN))) {
echo judgeClass($line) . "\n";
}
}
function judgeClass($w) {
global $table;
foreach ($table as $boundary => $name) {
if ($w <= $boundary) {
return $name;
}
}
return "heavy";
}
|
<?php
$table = array(
48.0 => "light fly",
51.0 => "fly",
54.0 => "bantam",
57.0 => "feather",
60.0 => "light",
64.0 => "light welter",
69.0 => "welter",
75.0 => "light middle",
81.0 => "middle",
91.0 => "light heavy",
PHP_INT_MAX => "heavy",
);
main();
function main() {
while ($line = trim(fgets(STDIN))) {
echo judgeClass($line) . "\n";
}
}
function judgeClass($w) {
global $table;
foreach ($table as $boundary => $name) {
if ($w <= $boundary) {
return $name;
}
}
return "heavy";
}
|
[["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605], ["-", 0, 493, 0, 1, 0, 11, 12, 227, 0, 70], ["+", 0, 493, 0, 1, 0, 11, 12, 227, 0, 516], ["+", 0, 493, 0, 1, 0, 11, 12, 227, 0, 24], ["-", 0, 493, 0, 1, 0, 11, 12, 227, 0, 73], ["+", 0, 493, 0, 1, 0, 11, 12, 227, 0, 25]]
| 6
| 152
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while (true) {
final String line = br.readLine();
if (line == null)
break;
double weight = Double.parseDouble(line);
if (weight <= 48.00) {
System.out.println("light fly");
} else if (48.00 < weight && weight <= 51.00) {
System.out.println("fly");
} else if (51.00 < weight && weight <= 54.00) {
System.out.println("bantam");
} else if (54.00 < weight && weight <= 57.00) {
System.out.println("feather");
} else if (57.00 < weight && weight <= 57.00) {
System.out.println("light");
} else if (60.00 < weight && weight <= 64.00) {
System.out.println("light welter");
} else if (64.00 < weight && weight <= 69.00) {
System.out.println("welter");
} else if (69.00 < weight && weight <= 75.00) {
System.out.println("light middle");
} else if (75.00 < weight && weight <= 81.00) {
System.out.println("middle");
} else if (81.00 < weight && weight <= 91.00) {
System.out.println("light heavy");
} else if (weight > 91.00) {
System.out.println("heavy");
}
}
}
}
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while (true) {
final String line = br.readLine();
if (line == null)
break;
double weight = Double.parseDouble(line);
if (weight <= 48.00) {
System.out.println("light fly");
} else if (48.00 < weight && weight <= 51.00) {
System.out.println("fly");
} else if (51.00 < weight && weight <= 54.00) {
System.out.println("bantam");
} else if (54.00 < weight && weight <= 57.00) {
System.out.println("feather");
} else if (57.00 < weight && weight <= 60.00) {
System.out.println("light");
} else if (60.00 < weight && weight <= 64.00) {
System.out.println("light welter");
} else if (64.00 < weight && weight <= 69.00) {
System.out.println("welter");
} else if (69.00 < weight && weight <= 75.00) {
System.out.println("light middle");
} else if (75.00 < weight && weight <= 81.00) {
System.out.println("middle");
} else if (81.00 < weight && weight <= 91.00) {
System.out.println("light heavy");
} else if (weight > 91.00) {
System.out.println("heavy");
}
}
}
}
|
[["-", 75, 57, 15, 15, 0, 16, 12, 16, 12, 515], ["+", 75, 57, 15, 15, 0, 16, 12, 16, 12, 515]]
| 3
| 344
|
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
List<String> al = new ArrayList<>();
double tmp;
while (sc.hasNext()) {
al.add(returnClass(sc.nextDouble()));
for (String i : al) {
System.out.println(i);
}
}
}
static String returnClass(double className) {
if (className <= 48)
return "light fly";
else if (className <= 51)
return "fly";
else if (className <= 54)
return "bantam";
else if (className <= 57)
return "feather";
else if (className <= 60)
return "light";
else if (className <= 64)
return "light welter";
else if (className <= 69)
return "welter";
else if (className <= 75)
return "light middle";
else if (className <= 81)
return "middle";
else if (className <= 91)
return "light heavy";
else
return "heavy";
}
}
|
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
List<String> al = new ArrayList<>();
while (sc.hasNext()) {
al.add(returnClass(sc.nextDouble()));
}
for (String i : al) {
System.out.println(i);
}
}
static String returnClass(double className) {
if (className <= 48)
return "light fly";
else if (className <= 51)
return "fly";
else if (className <= 54)
return "bantam";
else if (className <= 57)
return "feather";
else if (className <= 60)
return "light";
else if (className <= 64)
return "light welter";
else if (className <= 69)
return "welter";
else if (className <= 75)
return "light middle";
else if (className <= 81)
return "middle";
else if (className <= 91)
return "light heavy";
else
return "heavy";
}
}
|
[["-", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512], ["-", 0, 195, 8, 196, 0, 503, 49, 200, 141, 22], ["-", 8, 498, 0, 195, 8, 196, 0, 503, 0, 35], ["+", 0, 195, 8, 196, 0, 52, 8, 196, 0, 46], ["-", 0, 52, 8, 196, 0, 514, 8, 196, 0, 46]]
| 3
| 226
|
import java.util.Scanner;
public class Main {
private Scanner sc;
public static void main(String[] args) { new Main(); }
public Main() {
sc = new Scanner(System.in);
while (sc.hasNextLine()) {
double weight = Double.parseDouble(sc.nextLine());
String c = "";
if (weight > 91.0)
c = "heavy";
else if (weight > 81.0)
c = "light heavy";
else if (weight > 75.0)
c = "midle";
else if (weight > 69.0)
c = "light middle";
else if (weight > 64.0)
c = "welter";
else if (weight > 60.0)
c = "light welter";
else if (weight > 57.0)
c = "light";
else if (weight > 54.0)
c = "feather";
else if (weight > 51.0)
c = "bantam";
else if (weight > 48.0)
c = "fly";
else
c = "light fly";
System.out.println(c);
}
}
}
|
import java.util.Scanner;
public class Main {
private Scanner sc;
public static void main(String[] args) { new Main(); }
public Main() {
sc = new Scanner(System.in);
while (sc.hasNextLine()) {
double weight = Double.parseDouble(sc.nextLine());
String c = "";
if (weight > 91.0)
c = "heavy";
else if (weight > 81.0)
c = "light heavy";
else if (weight > 75.0)
c = "middle";
else if (weight > 69.0)
c = "light middle";
else if (weight > 64.0)
c = "welter";
else if (weight > 60.0)
c = "light welter";
else if (weight > 57.0)
c = "light";
else if (weight > 54.0)
c = "feather";
else if (weight > 51.0)
c = "bantam";
else if (weight > 48.0)
c = "fly";
else
c = "light fly";
System.out.println(c);
}
}
}
|
[["-", 75, 57, 64, 1, 0, 11, 12, 5, 0, 491], ["+", 75, 57, 64, 1, 0, 11, 12, 5, 0, 491]]
| 3
| 224
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
double wgt = Double.parseDouble(sc.nextLine());
String opt;
if (wgt <= 48.00) {
opt = "light fly";
} else if (wgt <= 51.00) {
opt = "fly";
} else if (wgt <= 54.00) {
opt = "bantam";
} else if (wgt <= 57.00) {
opt = "feather";
} else if (wgt <= 60.00) {
opt = "light";
} else if (wgt <= 64.00) {
opt = "light welter";
} else if (wgt <= 69.00) {
opt = "welter";
} else if (wgt <= 75.00) {
opt = "lihgt middle";
} else if (wgt <= 81.00) {
opt = "middle";
} else if (wgt <= 91.00) {
opt = "light heavy";
} else {
opt = "heavy";
}
System.out.println(opt);
}
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
double wgt = Double.parseDouble(sc.nextLine());
String opt;
if (wgt <= 48.00) {
opt = "light fly";
} else if (wgt <= 51.00) {
opt = "fly";
} else if (wgt <= 54.00) {
opt = "bantam";
} else if (wgt <= 57.00) {
opt = "feather";
} else if (wgt <= 60.00) {
opt = "light";
} else if (wgt <= 64.00) {
opt = "light welter";
} else if (wgt <= 69.00) {
opt = "welter";
} else if (wgt <= 75.00) {
opt = "light middle";
} else if (wgt <= 81.00) {
opt = "middle";
} else if (wgt <= 91.00) {
opt = "light heavy";
} else {
opt = "heavy";
}
System.out.println(opt);
}
}
}
|
[["-", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491], ["+", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491]]
| 3
| 229
|
import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
String str;
Double wgt;
Scanner in = new Scanner(System.in);
// BufferedReader in = new BufferedReader(new
//InputStreamReader(System.in));
while (in.hasNext()) {
wgt = in.nextDouble();
System.out.println(rank(wgt));
}
}
public static String rank(double weight) {
String[] date = {"light fly", "fly", "bantam", "heather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
int index = 0;
if (weight <= 48.00)
index = 0;
else if (weight > 48.00 && weight <= 51.00)
index = 1;
else if (weight > 51.00 && weight <= 54.00)
index = 2;
else if (weight > 54.00 && weight <= 57.00)
index = 3;
else if (weight > 57.00 && weight <= 60.00)
index = 4;
else if (weight > 60.00 && weight <= 64.00)
index = 5;
else if (weight > 64.00 && weight <= 69.00)
index = 6;
else if (weight > 69.00 && weight <= 75.00)
index = 7;
else if (weight > 75.00 && weight <= 81.00)
index = 8;
else if (weight > 81.00 && weight <= 91.00)
index = 9;
else if (weight > 91.00)
index = 10;
return date[index];
}
}
|
import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
String str;
Double wgt;
Scanner in = new Scanner(System.in);
// BufferedReader in = new BufferedReader(new
//InputStreamReader(System.in));
while (in.hasNext()) {
wgt = in.nextDouble();
System.out.println(rank(wgt));
}
}
public static String rank(double weight) {
String[] date = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
int index = 0;
if (weight <= 48.00)
index = 0;
else if (weight > 48.00 && weight <= 51.00)
index = 1;
else if (weight > 51.00 && weight <= 54.00)
index = 2;
else if (weight > 54.00 && weight <= 57.00)
index = 3;
else if (weight > 57.00 && weight <= 60.00)
index = 4;
else if (weight > 60.00 && weight <= 64.00)
index = 5;
else if (weight > 64.00 && weight <= 69.00)
index = 6;
else if (weight > 69.00 && weight <= 75.00)
index = 7;
else if (weight > 75.00 && weight <= 81.00)
index = 8;
else if (weight > 81.00 && weight <= 91.00)
index = 9;
else if (weight > 91.00)
index = 10;
return date[index];
}
}
|
[["-", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491], ["+", 0, 503, 49, 200, 51, 518, 0, 5, 0, 491]]
| 3
| 310
|
import java.util.*;
public class Main {
public static void main(String[] args) throws java.io.IOException {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
double w = scan.nextDouble();
if (w > 91.00)
System.out.println("heaby");
else if (81.00 < w && w <= 91.00)
System.out.println("light heavy");
else if (75.00 < w && w <= 81.00)
System.out.println("middle");
else if (69.00 < w && w <= 75.00)
System.out.println("light middle");
else if (64.00 < w && w <= 69.00)
System.out.println("welter");
else if (60.00 < w && w <= 64.00)
System.out.println("light welter");
else if (57.00 < w && w <= 60.00)
System.out.println("light");
else if (54.00 < w && w <= 57.00)
System.out.println("feather");
else if (51.00 < w && w <= 54.00)
System.out.println("bantam");
else if (48.00 < w && w <= 51.00)
System.out.println("fly");
else
System.out.println("light fly");
}
}
}
|
import java.util.*;
public class Main {
public static void main(String[] args) throws java.io.IOException {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
double w = scan.nextDouble();
if (w > 91.00)
System.out.println("heavy");
else if (81.00 < w && w <= 91.00)
System.out.println("light heavy");
else if (75.00 < w && w <= 81.00)
System.out.println("middle");
else if (69.00 < w && w <= 75.00)
System.out.println("light middle");
else if (64.00 < w && w <= 69.00)
System.out.println("welter");
else if (60.00 < w && w <= 64.00)
System.out.println("light welter");
else if (57.00 < w && w <= 60.00)
System.out.println("light");
else if (54.00 < w && w <= 57.00)
System.out.println("feather");
else if (51.00 < w && w <= 54.00)
System.out.println("bantam");
else if (48.00 < w && w <= 51.00)
System.out.println("fly");
else
System.out.println("light fly");
}
}
}
|
[["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
| 3
| 287
|
import java.util.Scanner;
public class Main {
public static void main(String arg[]) {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
double a = scan.nextDouble();
if (a <= 48.00)
System.out.println("light fly");
else if (a <= 51.00)
System.out.println("fly");
else if (a <= 54.00)
System.out.println("bantam");
else if (a <= 57.00)
System.out.println("fether");
else if (a <= 60.00)
System.out.println("light");
else if (a <= 64.00)
System.out.println("light welter");
else if (a <= 69.00)
System.out.println("welter");
else if (a <= 75.00)
System.out.println("light middle");
else if (a <= 81.00)
System.out.println("midle");
else if (a <= 91.00)
System.out.println("light heavy");
else
System.out.println("heavy");
}
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String arg[]) {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
double a = scan.nextDouble();
if (a <= 48.00)
System.out.println("light fly");
else if (a <= 51.00)
System.out.println("fly");
else if (a <= 54.00)
System.out.println("bantam");
else if (a <= 57.00)
System.out.println("feather");
else if (a <= 60.00)
System.out.println("light");
else if (a <= 64.00)
System.out.println("light welter");
else if (a <= 69.00)
System.out.println("welter");
else if (a <= 75.00)
System.out.println("light middle");
else if (a <= 81.00)
System.out.println("middle");
else if (a <= 91.00)
System.out.println("light heavy");
else
System.out.println("heavy");
}
}
}
|
[["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
| 3
| 245
|
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> ans = new ArrayList<String>();
String[] msg = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy"};
double[] w = {48, 51, 54, 57, 60, 64, 69, 75, 81, 90};
while (true) {
String s = br.readLine();
if (s == null)
break;
double weight = Double.parseDouble(s);
for (int i = 0; i < w.length; i++) {
if (weight <= w[i]) {
ans.add(msg[i]);
break;
}
if (i == w.length - 1) {
ans.add("heavy");
}
}
}
for (String a : ans)
System.out.println(a);
}
}
|
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> ans = new ArrayList<String>();
String[] msg = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy"};
double[] w = {48, 51, 54, 57, 60, 64, 69, 75, 81, 91};
while (true) {
String s = br.readLine();
if (s == null)
break;
double weight = Double.parseDouble(s);
for (int i = 0; i < w.length; i++) {
if (weight <= w[i]) {
ans.add(msg[i]);
break;
}
if (i == w.length - 1) {
ans.add("heavy");
}
}
}
for (String a : ans)
System.out.println(a);
}
}
|
[["-", 8, 196, 0, 503, 49, 200, 51, 518, 0, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 518, 0, 499]]
| 3
| 246
|
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String out = "";
while (scanner.hasNext()) {
double w = scanner.nextDouble();
if (91.00 < w) {
out += "heavy";
} else if (81.00 < w && w <= 91.00) {
out += "light heavy";
} else if (75.00 < w && w <= 81.00) {
out += "middle";
} else if (69.00 < w && w <= 75.00) {
out += "light middle";
} else if (64.00 < w && w <= 69.00) {
out += "welter";
} else if (60.00 < w && w <= 64.00) {
out += "light welter";
} else if (57.00 < w && w <= 60.00) {
out += "lightkg";
} else if (54.00 < w && w <= 57.00) {
out += "feather";
} else if (51.00 < w && w <= 54.00) {
out += "bantamkg";
} else if (48.00 < w && w <= 51.00) {
out += "fly";
} else if (w <= 48.00) {
out += "light fly";
}
out += "\n";
}
System.out.print(out);
}
}
|
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String out = "";
while (scanner.hasNext()) {
double w = scanner.nextDouble();
if (91.00 < w) {
out += "heavy";
} else if (81.00 < w && w <= 91.00) {
out += "light heavy";
} else if (75.00 < w && w <= 81.00) {
out += "middle";
} else if (69.00 < w && w <= 75.00) {
out += "light middle";
} else if (64.00 < w && w <= 69.00) {
out += "welter";
} else if (60.00 < w && w <= 64.00) {
out += "light welter";
} else if (57.00 < w && w <= 60.00) {
out += "light";
} else if (54.00 < w && w <= 57.00) {
out += "feather";
} else if (51.00 < w && w <= 54.00) {
out += "bantam";
} else if (48.00 < w && w <= 51.00) {
out += "fly";
} else if (w <= 48.00) {
out += "light fly";
}
out += "\n";
}
System.out.print(out);
}
}
|
[["-", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491], ["+", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491]]
| 3
| 274
|
import java.io.*;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((str = input.readLine()) != null) {
float w = Float.parseFloat(str);
if (w <= 48.00)
System.out.println("light fly");
else if (48.00 < w && w <= 51.00)
System.out.println("fly");
else if (51.00 < w && w <= 54.00)
System.out.println("bantam");
else if (54.00 < w && w <= 57.00)
System.out.println("feather");
else if (57.00 < w && w <= 60.00)
System.out.println("light");
else if (60.00 < w && w <= 64.00)
System.out.println("light welter");
else if (64.00 < w && w <= 69.00)
System.out.println("welter");
else if (69.00 < w && w <= 75.00)
System.out.println("light middle");
else if (75.00 < w && w <= 81.00)
System.out.println("middle");
else if (81.00 < w && w <= 91.00)
System.out.println("light heavy");
else if (w < 91)
System.out.println("heavy");
}
}
}
|
import java.io.*;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((str = input.readLine()) != null) {
float w = Float.parseFloat(str);
if (w <= 48.00)
System.out.println("light fly");
else if (48.00 < w && w <= 51.00)
System.out.println("fly");
else if (51.00 < w && w <= 54.00)
System.out.println("bantam");
else if (54.00 < w && w <= 57.00)
System.out.println("feather");
else if (57.00 < w && w <= 60.00)
System.out.println("light");
else if (60.00 < w && w <= 64.00)
System.out.println("light welter");
else if (64.00 < w && w <= 69.00)
System.out.println("welter");
else if (69.00 < w && w <= 75.00)
System.out.println("light middle");
else if (75.00 < w && w <= 81.00)
System.out.println("middle");
else if (81.00 < w && w <= 91.00)
System.out.println("light heavy");
else if (91.00 < w)
System.out.println("heavy");
}
}
}
|
[["-", 75, 57, 75, 57, 15, 15, 0, 16, 31, 22], ["+", 75, 57, 75, 57, 15, 15, 0, 16, 31, 515], ["-", 75, 57, 75, 57, 15, 15, 0, 16, 12, 499], ["+", 75, 57, 75, 57, 15, 15, 0, 16, 12, 22]]
| 3
| 302
|
#include <stdio.h>
double lim[10] = {48.00, 51.00, 54.00, 57.00, 60.00,
64.00, 69.00, 75.00, 81.00, 91.00};
char rank[11][16] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
int c = 0;
while (weight > lim[c] && c < 11)
c++;
printf("%s\n", rank[c]);
}
return 0;
}
|
#include <stdio.h>
double lim[10] = {48.00, 51.00, 54.00, 57.00, 60.00,
64.00, 69.00, 75.00, 81.00, 91.00};
char rank[11][16] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
int c = 0;
while (weight > lim[c] && c < 10)
c++;
printf("%s\n", rank[c]);
}
return 0;
}
|
[["-", 0, 52, 15, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 52, 15, 23, 0, 16, 12, 16, 12, 13]]
| 0
| 148
|
#include <stdio.h>
int main() {
double w;
while (scanf("%lf", &w) != EOF) {
if (w > 91.00)
printf("heavy\n");
else if (w > 81.00)
printf("light heavy\n");
else if (w > 75.00)
printf("middle\n");
else if (w > 69.00)
printf("light middle\n");
else if (w > 64.00)
printf("welter\n");
else if (w > 60.00)
printf("light weler\n");
else if (w > 57.00)
printf("light\n");
else if (w > 54.00)
printf("feathe\n");
else if (w > 51.00)
printf("bantam\n");
else if (w > 48.00)
printf("fly\n");
else
printf("lightfly\n");
}
return 0;
}
|
#include <stdio.h>
int main() {
double w;
while (scanf("%lf", &w) != EOF) {
if (w > 91.00)
printf("heavy\n");
else if (w > 81.00)
printf("light heavy\n");
else if (w > 75.00)
printf("middle\n");
else if (w > 69.00)
printf("light middle\n");
else if (w > 64.00)
printf("welter\n");
else if (w > 60.00)
printf("light welter\n");
else if (w > 57.00)
printf("light\n");
else if (w > 54.00)
printf("feather\n");
else if (w > 51.00)
printf("bantam\n");
else if (w > 48.00)
printf("fly\n");
else
printf("light fly\n");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 188
|
#include <stdio.h>
char *class[11] = {"light fly\n", "fly\n", "bantam\n",
"feather\n", "light\n", "light welter\n",
"welter\n", "light middle\n", "middle\n",
"light heavy\n", "heavy\n"};
double weight[10] = {48, 51, 54, 57, 60, 64, 69, 75, 81, 91};
int main() {
double m;
int i;
while (scanf("%lf", &m) != EOF) {
for (i = 0; m >= weight[i] && i < 10; i++)
;
printf("%s", class[i]);
}
return 0;
}
|
#include <stdio.h>
char *class[11] = {"light fly\n", "fly\n", "bantam\n",
"feather\n", "light\n", "light welter\n",
"welter\n", "light middle\n", "middle\n",
"light heavy\n", "heavy\n"};
double weight[10] = {48, 51, 54, 57, 60, 64, 69, 75, 81, 91};
int main() {
double m;
int i;
while (scanf("%lf", &m) != EOF) {
for (i = 0; m > weight[i] && i < 10; i++)
;
printf("%s", class[i]);
}
return 0;
}
|
[["-", 8, 9, 0, 7, 15, 16, 31, 16, 17, 20], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 17, 47]]
| 0
| 158
|
#include <stdio.h>
int main(void) {
double w;
while (scanf("%lf", &w) != EOF) {
if (w > 91.0)
puts("heavy");
else if (w > 81.0)
puts("light heavy");
else if (w > 75.0)
puts("middle");
else if (w > 69.0)
puts("light middle");
else if (w > 64.0)
puts("welter");
else if (w > 60.0)
puts("light walter");
else if (w > 57.0)
puts("light");
else if (w > 54.0)
puts("feather");
else if (w > 51.0)
puts("bantam");
else if (w > 48.0)
puts("fly");
else
puts("light fly");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double w;
while (scanf("%lf", &w) != EOF) {
if (w > 91.0)
puts("heavy");
else if (w > 81.0)
puts("light heavy");
else if (w > 75.0)
puts("middle");
else if (w > 69.0)
puts("light middle");
else if (w > 64.0)
puts("welter");
else if (w > 60.0)
puts("light welter");
else if (w > 57.0)
puts("light");
else if (w > 54.0)
puts("feather");
else if (w > 51.0)
puts("bantam");
else if (w > 48.0)
puts("fly");
else
puts("light fly");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 178
|
#include <stdio.h>
int main(void) {
double w;
while (scanf("%lf", &w) != EOF) {
if (w <= 48.00) {
printf("light fly\n");
}
if (48.00 < w && w <= 51.00) {
printf("fly\n");
}
if (51.00 < w && w <= 54.00) {
printf("bantam\n");
}
if (54.00 < w && w <= 57.00) {
printf("feather\n");
}
if (57.00 < w && w <= 60.00) {
printf("light\n");
}
if (60.00 < w && w <= 64.00) {
printf("light welter\n");
}
if (64.00 < w && w <= 69.00) {
printf("welter\n");
}
if (69.00 < w && w <= 75.00) {
printf("light middle\n");
}
if (75.00 < w && w <= 81.00) {
printf("middle\n");
}
if (81.00 < w && w <= 91.00) {
printf("light heavy\n");
}
if (91.00 < w) {
printf("fly\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double w;
while (scanf("%lf", &w) != EOF) {
if (w <= 48.00) {
printf("light fly\n");
}
if (48.00 < w && w <= 51.00) {
printf("fly\n");
}
if (51.00 < w && w <= 54.00) {
printf("bantam\n");
}
if (54.00 < w && w <= 57.00) {
printf("feather\n");
}
if (57.00 < w && w <= 60.00) {
printf("light\n");
}
if (60.00 < w && w <= 64.00) {
printf("light welter\n");
}
if (64.00 < w && w <= 69.00) {
printf("welter\n");
}
if (69.00 < w && w <= 75.00) {
printf("light middle\n");
}
if (75.00 < w && w <= 81.00) {
printf("middle\n");
}
if (81.00 < w && w <= 91.00) {
printf("light heavy\n");
}
if (91.00 < w) {
printf("heavy\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 243
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (48.00 >= weight) {
printf("light fly\n");
} else if (48.00 < weight && 51.00 >= weight) {
printf("fly\n");
} else if (51.00 < weight && 54.00 >= weight) {
printf("bantam\n");
} else if (54.00 < weight && 57.00 >= weight) {
printf("feather\n");
} else if (57.00 < weight && 60.00 >= weight) {
printf("light\n");
} else if (60.00 < weight && 64.00 >= weight) {
printf("light welter\n");
} else if (64.00 < weight && 69.00 >= weight) {
printf("welter\n");
} else if (69.00 < weight && 75.00 >= weight) {
printf("light middle\n");
} else if (75.00 < weight && 81.00 >= weight) {
printf("middle\n");
} else if (81.00 < weight && 91.00 >= weight) {
printf("light heavy\n");
} else if (91.00 > weight) {
printf("heavy\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (48.00 >= weight) {
printf("light fly\n");
} else if (48.00 < weight && 51.00 >= weight) {
printf("fly\n");
} else if (51.00 < weight && 54.00 >= weight) {
printf("bantam\n");
} else if (54.00 < weight && 57.00 >= weight) {
printf("feather\n");
} else if (57.00 < weight && 60.00 >= weight) {
printf("light\n");
} else if (60.00 < weight && 64.00 >= weight) {
printf("light welter\n");
} else if (64.00 < weight && 69.00 >= weight) {
printf("welter\n");
} else if (69.00 < weight && 75.00 >= weight) {
printf("light middle\n");
} else if (75.00 < weight && 81.00 >= weight) {
printf("middle\n");
} else if (81.00 < weight && 91.00 >= weight) {
printf("light heavy\n");
} else if (91.00 < weight) {
printf("heavy\n");
}
}
return 0;
}
|
[["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18]]
| 0
| 253
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48.00)
printf("liget fly\n");
else if (48.00 < weight && weight <= 51.00)
printf("fly\n");
else if (51.00 < weight && weight <= 54.00)
printf("bantam\n");
else if (54.00 < weight && weight <= 57.00)
printf("feather\n");
else if (57.00 < weight && weight <= 60.00)
printf("light\n");
else if (60.00 < weight && weight <= 64.00)
printf("light welter\n");
else if (64.00 < weight && weight <= 69.00)
printf("welter\n");
else if (69.00 < weight && weight <= 75.00)
printf("light middle\n");
else if (75.00 < weight && weight <= 81.00)
printf("middle\n");
else if (81.00 < weight && weight <= 91.00)
printf("light heavy\n");
else if (91.00 < weight)
printf("heavy\n");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48.00)
printf("light fly\n");
else if (48.00 < weight && weight <= 51.00)
printf("fly\n");
else if (51.00 < weight && weight <= 54.00)
printf("bantam\n");
else if (54.00 < weight && weight <= 57.00)
printf("feather\n");
else if (57.00 < weight && weight <= 60.00)
printf("light\n");
else if (60.00 < weight && weight <= 64.00)
printf("light welter\n");
else if (64.00 < weight && weight <= 69.00)
printf("welter\n");
else if (69.00 < weight && weight <= 75.00)
printf("light middle\n");
else if (75.00 < weight && weight <= 81.00)
printf("middle\n");
else if (81.00 < weight && weight <= 91.00)
printf("light heavy\n");
else if (91.00 < weight)
printf("heavy\n");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 231
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48)
printf("light fly\n");
else if (weight > 48 && weight <= 51)
printf("fly\n");
if (weight > 51 && weight <= 54)
printf("bantam\n");
if (weight > 54 && weight <= 57)
printf("feathet\n");
if (weight > 57 && weight <= 60)
printf("light\n");
if (weight > 60 && weight <= 64)
printf("light welter\n");
if (weight > 64 && weight <= 69)
printf("welter\n");
if (weight > 69 && weight <= 75)
printf("light middle\n");
if (weight > 75 && weight <= 81)
printf("middle\n");
if (weight > 81 && weight <= 91)
printf("light heavy\n");
if (weight > 91)
printf("heavy\n");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48)
printf("light fly\n");
else if (weight > 48 && weight <= 51)
printf("fly\n");
if (weight > 51 && weight <= 54)
printf("bantam\n");
if (weight > 54 && weight <= 57)
printf("feather\n");
if (weight > 57 && weight <= 60)
printf("light\n");
if (weight > 60 && weight <= 64)
printf("light welter\n");
if (weight > 64 && weight <= 69)
printf("welter\n");
if (weight > 69 && weight <= 75)
printf("light middle\n");
if (weight > 75 && weight <= 81)
printf("middle\n");
if (weight > 81 && weight <= 91)
printf("light heavy\n");
if (weight > 91)
printf("heavy\n");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 222
|
#include <stdio.h>
int main() {
double in;
while (scanf("%lf", &in) != EOF) {
if (in > 91) {
printf("heavy\n");
} else if (in > 81) {
printf("light heavy\n");
} else if (in > 75) {
printf("middle\n");
} else if (in > 69) {
printf("light middle\n");
} else if (in > 64) {
printf("welter\n");
} else if (in > 60) {
printf("light welter\n");
} else if (in > 57) {
printf("light\n");
} else if (in > 54) {
printf("fether\n");
} else if (in > 51) {
printf("bantam\n");
} else if (in > 48) {
printf("fly\n");
} else {
printf("light fly\n");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
double in;
while (scanf("%lf", &in) != EOF) {
if (in > 91) {
printf("heavy\n");
} else if (in > 81) {
printf("light heavy\n");
} else if (in > 75) {
printf("middle\n");
} else if (in > 69) {
printf("light middle\n");
} else if (in > 64) {
printf("welter\n");
} else if (in > 60) {
printf("light welter\n");
} else if (in > 57) {
printf("light\n");
} else if (in > 54) {
printf("feather\n");
} else if (in > 51) {
printf("bantam\n");
} else if (in > 48) {
printf("fly\n");
} else {
printf("light fly\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 210
|
#include <stdio.h>
int main(void) {
double x;
while (1) {
if (scanf("%lf", &x) == EOF) {
break;
}
if (48.00 >= x) {
puts("light fly");
} else if (48.00 < x && 51.00 >= x) {
puts("fly");
} else if (51.00 < x && 54.00 >= x) {
puts("bantam");
} else if (54.00 < x && 57.00 >= x) {
puts("feather");
} else if (57.00 < x && 60.00 >= x) {
puts("light");
} else if (60.00 < x && 64.00 >= x) {
puts("light welter");
} else if (64.00 < x && 69.00 >= x) {
puts("welter");
} else if (69.00 < x && 75.00 >= x) {
puts("light middle");
} else if (75.00 < x && 81.00 >= x) {
puts("middle");
} else if (81.00 > x && 91.00 >= x) {
puts("light heavy");
} else if (91.00 < x) {
puts("heavy");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double x;
while (1) {
if (scanf("%lf", &x) == EOF) {
break;
}
if (48.00 >= x) {
puts("light fly");
} else if (48.00 < x && 51.00 >= x) {
puts("fly");
} else if (51.00 < x && 54.00 >= x) {
puts("bantam");
} else if (54.00 < x && 57.00 >= x) {
puts("feather");
} else if (57.00 < x && 60.00 >= x) {
puts("light");
} else if (60.00 < x && 64.00 >= x) {
puts("light welter");
} else if (64.00 < x && 69.00 >= x) {
puts("welter");
} else if (69.00 < x && 75.00 >= x) {
puts("light middle");
} else if (75.00 < x && 81.00 >= x) {
puts("middle");
} else if (81.00 < x && 91.00 >= x) {
puts("light heavy");
} else if (91.00 < x) {
puts("heavy");
}
}
return 0;
}
|
[["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 18]]
| 0
| 250
|
#include <stdio.h>
char *class[11] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
int limit[11] = {48, 51, 54, 57, 60, 64, 69, 75, 81, 91, -1};
int main(void) {
float weight;
int i;
while (scanf("%f", &weight) == 1) {
for (i = 0; i < 10; i++)
if (weight < limit[i])
break;
printf("%s\n", class[i]);
}
return 0;
}
|
#include <stdio.h>
char *class[11] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
int limit[11] = {48, 51, 54, 57, 60, 64, 69, 75, 81, 91, -1};
int main(void) {
float weight;
int i;
while (scanf("%f", &weight) == 1) {
for (i = 0; i < 10; i++)
if (weight <= limit[i])
break;
printf("%s\n", class[i]);
}
return 0;
}
|
[["-", 0, 7, 8, 57, 15, 23, 0, 16, 17, 18], ["+", 0, 7, 8, 57, 15, 23, 0, 16, 17, 19]]
| 0
| 154
|
#include <stdio.h>
int main(void) {
double h;
while (scanf("%lf", &h) != EOF) {
if (h <= 48.0)
printf("light fly\n");
else if (h > 48.0 && h <= 51.0)
printf("fly\n");
else if (h > 51.0 && h <= 54.0)
printf("bantam\n");
else if (h > 54.0 && h <= 57.0)
printf("feather\n");
else if (h > 57.0 && h <= 60.0)
printf("light\n");
else if (h > 60.0 && h <= 64.0)
printf("light welter\n");
else if (h > 64.0 && h <= 69.0)
printf("welter\n");
else if (h > 69.0 && h <= 75.0)
printf("light middle\n");
else if (h > 75.0 && h <= 81.0)
printf("middle\n");
else if (h > 81.0 && h <= 91.0)
printf("light heavy\n");
else
printf("heavy");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double h;
while (scanf("%lf", &h) != EOF) {
if (h <= 48.0)
printf("light fly\n");
else if (h > 48.0 && h <= 51.0)
printf("fly\n");
else if (h > 51.0 && h <= 54.0)
printf("bantam\n");
else if (h > 54.0 && h <= 57.0)
printf("feather\n");
else if (h > 57.0 && h <= 60.0)
printf("light\n");
else if (h > 60.0 && h <= 64.0)
printf("light welter\n");
else if (h > 64.0 && h <= 69.0)
printf("welter\n");
else if (h > 69.0 && h <= 75.0)
printf("light middle\n");
else if (h > 75.0 && h <= 81.0)
printf("middle\n");
else if (h > 81.0 && h <= 91.0)
printf("light heavy\n");
else
printf("heavy\n");
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 224
|
#include <math.h>
#include <stdio.h>
int main(void) {
double ww;
while (scanf("%lf", &ww) != EOF) {
if (ww > 91.0)
printf("heavy\n");
else if (ww > 81.0)
printf("light heavy\n");
else if (ww > 75.0)
printf("middle\n");
else if (ww > 69.0)
printf("light middle\n");
else if (ww > 94.0)
printf("welter\n");
else if (ww > 60.0)
printf("light welter\n");
else if (ww > 57.0)
printf("light\n");
else if (ww > 54.0)
printf("feather\n");
else if (ww > 51.0)
printf("bantam\n");
else if (ww > 48.0)
printf("fly\n");
else
printf("light fly\n");
}
return 0;
}
|
#include <math.h>
#include <stdio.h>
int main(void) {
double ww;
while (scanf("%lf", &ww) != EOF) {
if (ww > 91.0)
printf("heavy\n");
else if (ww > 81.0)
printf("light heavy\n");
else if (ww > 75.0)
printf("middle\n");
else if (ww > 69.0)
printf("light middle\n");
else if (ww > 64.0)
printf("welter\n");
else if (ww > 60.0)
printf("light welter\n");
else if (ww > 57.0)
printf("light\n");
else if (ww > 54.0)
printf("feather\n");
else if (ww > 51.0)
printf("bantam\n");
else if (ww > 48.0)
printf("fly\n");
else
printf("light fly\n");
}
return 0;
}
|
[["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13]]
| 0
| 191
|
#include <stdio.h>
main() {
double n;
while (scanf("%lf", &n) != EOF) {
if (n <= 48.00)
printf("light fly");
else if (n <= 51.00)
printf("fly");
else if (n <= 54.00)
printf("bantam");
else if (n <= 57.00)
printf("feather");
else if (n <= 60.00)
printf("light");
else if (n <= 64.00)
printf("light welter");
else if (n <= 69.00)
printf("middle");
else if (n <= 75.00)
printf("light middle");
else if (n <= 81.00)
printf("middle");
else if (n <= 91.00)
printf("light heavy");
else
printf("heavy");
printf("\n");
}
return 0;
}
|
#include <stdio.h>
main() {
double n;
while (scanf("%lf", &n) != EOF) {
if (n <= 48.00)
printf("light fly");
else if (n <= 51.00)
printf("fly");
else if (n <= 54.00)
printf("bantam");
else if (n <= 57.00)
printf("feather");
else if (n <= 60.00)
printf("light");
else if (n <= 64.00)
printf("light welter");
else if (n <= 69.00)
printf("welter");
else if (n <= 75.00)
printf("light middle");
else if (n <= 81.00)
printf("middle");
else if (n <= 91.00)
printf("light heavy");
else
printf("heavy");
printf("\n");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 184
|
#include <stdio.h>
int main() {
double a[100], n;
int i = 0;
while (scanf("%lf", &n) != EOF) {
a[i] = n;
i++;
}
int j;
for (j = 0; j < i; j++) {
if (a[j] <= 48) {
puts("light fly");
} else if (a[j] <= 51) {
puts("fly");
} else if (a[j] <= 54) {
puts("bantam");
} else if (a[j] <= 57) {
puts("feather");
} else if (a[j] <= 60) {
puts("light");
} else if (a[j] <= 64) {
puts("light welter");
} else if (a[j] <= 69) {
puts("welter");
} else if (a[j] <= 75) {
puts("light middle");
} else if (a[j] <= 81) {
puts("middle");
} else if (a[j] <= 91) {
puts("light heavy");
} else {
puts("heave");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
double a[100], n;
int i = 0;
while (scanf("%lf", &n) != EOF) {
a[i] = n;
i++;
}
int j;
for (j = 0; j < i; j++) {
if (a[j] <= 48) {
puts("light fly");
} else if (a[j] <= 51) {
puts("fly");
} else if (a[j] <= 54) {
puts("bantam");
} else if (a[j] <= 57) {
puts("feather");
} else if (a[j] <= 60) {
puts("light");
} else if (a[j] <= 64) {
puts("light welter");
} else if (a[j] <= 69) {
puts("welter");
} else if (a[j] <= 75) {
puts("light middle");
} else if (a[j] <= 81) {
puts("middle");
} else if (a[j] <= 91) {
puts("light heavy");
} else {
puts("heavy");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 267
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48.00) {
printf("light fly\n");
} else if (weight <= 51.00) {
printf("fly\n");
} else if (weight <= 54.00) {
printf("bantam\n");
} else if (weight <= 57.00) {
printf("feather\n");
} else if (weight <= 60.00) {
printf("light\n");
} else if (weight <= 64.00) {
printf("light welter\n");
} else if (weight <= 69.00) {
printf("welter\n");
} else if (weight <= 75.00) {
printf("light middle\n");
} else if (weight <= 81.00) {
printf("middle\n");
} else if (weight <= 91.00) {
printf("light heavy\n");
} else {
printf("light fly\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48.00) {
printf("light fly\n");
} else if (weight <= 51.00) {
printf("fly\n");
} else if (weight <= 54.00) {
printf("bantam\n");
} else if (weight <= 57.00) {
printf("feather\n");
} else if (weight <= 60.00) {
printf("light\n");
} else if (weight <= 64.00) {
printf("light welter\n");
} else if (weight <= 69.00) {
printf("welter\n");
} else if (weight <= 75.00) {
printf("light middle\n");
} else if (weight <= 81.00) {
printf("middle\n");
} else if (weight <= 91.00) {
printf("light heavy\n");
} else {
printf("heavy\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 211
|
#include <stdio.h>
int main(void) {
float weight;
while (scanf("%f", &weight) != EOF) {
if (weight < 48.0) {
puts("light fly");
} else if (weight <= 51.0) {
puts("fly");
} else if (weight <= 54.0) {
puts("bantam");
} else if (weight <= 57.0) {
puts("feather");
} else if (weight <= 60.0) {
puts("light");
} else if (weight <= 64.0) {
puts("light welter");
} else if (weight <= 69.0) {
puts("welter");
} else if (weight <= 75.0) {
puts("light middle");
} else if (weight <= 81.0) {
puts("middle");
} else if (weight <= 91.0) {
puts("light heavy");
} else {
puts("heavy");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
float weight;
while (scanf("%f", &weight) != EOF) {
if (weight <= 48.0) {
puts("light fly");
} else if (weight <= 51.0) {
puts("fly");
} else if (weight <= 54.0) {
puts("bantam");
} else if (weight <= 57.0) {
puts("feather");
} else if (weight <= 60.0) {
puts("light");
} else if (weight <= 64.0) {
puts("light welter");
} else if (weight <= 69.0) {
puts("welter");
} else if (weight <= 75.0) {
puts("light middle");
} else if (weight <= 81.0) {
puts("middle");
} else if (weight <= 91.0) {
puts("light heavy");
} else {
puts("heavy");
}
}
return 0;
}
|
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19]]
| 0
| 200
|
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define EPS (1e-10)
const char *Class(double w) {
#define judgeit(lim, name) \
{ \
if (w < lim + EPS) \
return name; \
}
judgeit(48.00, "light fly");
judgeit(51.00, "fly");
judgeit(54.00, "bantam");
judgeit(57.00, "feather");
judgeit(60.00, "light");
judgeit(64.00, "light welter");
judgeit(69.00, "welter");
judgeit(75.00, "light middle");
judgeit(81.00, "middle");
judgeit(91.00, "light heavy");
return "heaby";
}
int main(int argc, char **argv) {
double weight;
while (cin >> weight) {
cout << Class(weight) << endl;
}
return 0;
}
|
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define EPS (1e-10)
const char *Class(double w) {
#define judgeit(lim, name) \
{ \
if (w < lim + EPS) \
return name; \
}
judgeit(48.00, "light fly");
judgeit(51.00, "fly");
judgeit(54.00, "bantam");
judgeit(57.00, "feather");
judgeit(60.00, "light");
judgeit(64.00, "light welter");
judgeit(69.00, "welter");
judgeit(75.00, "light middle");
judgeit(81.00, "middle");
judgeit(91.00, "light heavy");
return "heavy";
}
int main(int argc, char **argv) {
double weight;
while (cin >> weight) {
cout << Class(weight) << endl;
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 37, 0, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 37, 0, 5, 0, 6]]
| 1
| 167
|
#include <iostream>
using namespace std;
int main() {
double w;
while (cin >> w) {
if (w <= 48.0) {
cout << "light fly" << endl;
continue;
} else if (w <= 51.0) {
cout << "fly" << endl;
continue;
} else if (w <= 54.0) {
cout << "bantan" << endl;
continue;
} else if (w <= 57.0) {
cout << "feather" << endl;
} else if (w <= 60.0) {
cout << "light" << endl;
continue;
} else if (w <= 64.0) {
cout << "light welter" << endl;
continue;
} else if (w <= 69.0) {
cout << "welter" << endl;
continue;
} else if (w <= 75.0) {
cout << "light middle" << endl;
continue;
} else if (w <= 81.0) {
cout << "middle" << endl;
continue;
} else if (w <= 91.0) {
cout << "light heavy" << endl;
continue;
} else
cout << "heavy" << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
double w;
while (cin >> w) {
if (w <= 48.0) {
cout << "light fly" << endl;
continue;
} else if (w <= 51.0) {
cout << "fly" << endl;
continue;
} else if (w <= 54.0) {
cout << "bantam" << endl;
continue;
} else if (w <= 57.0) {
cout << "feather" << endl;
} else if (w <= 60.0) {
cout << "light" << endl;
continue;
} else if (w <= 64.0) {
cout << "light welter" << endl;
continue;
} else if (w <= 69.0) {
cout << "welter" << endl;
continue;
} else if (w <= 75.0) {
cout << "light middle" << endl;
continue;
} else if (w <= 81.0) {
cout << "middle" << endl;
continue;
} else if (w <= 91.0) {
cout << "light heavy" << endl;
continue;
} else
cout << "heavy" << endl;
}
return 0;
}
|
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 222
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double w;
while (scanf("%lf", &w) != EOF) {
if (w <= 48.0)
cout << "light fly" << endl;
else if (48.0 < w && w <= 51.0)
cout << "fly" << endl;
else if (51.0 < w && w <= 54.0)
cout << "bantam" << endl;
else if (54.0 < w && w <= 57.0)
cout << "feather" << endl;
else if (57.0 < w && w <= 60.0)
cout << "light" << endl;
else if (60.0 < w && w <= 64.0)
cout << "light welter" << endl;
else if (64.00 < w && w <= 69.0)
cout << "welter" << endl;
else if (69.0 < w && w <= 75.0)
cout << "light middle" << endl;
else if (75.0 < w && w <= 81.0)
cout << "middle" << endl;
else if (81.0 < w && w <= 91.0)
cout << "light heavy" << endl;
else if (91.0 > w)
cout << "heavy" << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double w;
while (scanf("%lf", &w) != EOF) {
if (w <= 48.0)
cout << "light fly" << endl;
else if (48.0 < w && w <= 51.0)
cout << "fly" << endl;
else if (51.0 < w && w <= 54.0)
cout << "bantam" << endl;
else if (54.0 < w && w <= 57.0)
cout << "feather" << endl;
else if (57.0 < w && w <= 60.0)
cout << "light" << endl;
else if (60.0 < w && w <= 64.0)
cout << "light welter" << endl;
else if (64.00 < w && w <= 69.0)
cout << "welter" << endl;
else if (69.0 < w && w <= 75.0)
cout << "light middle" << endl;
else if (75.0 < w && w <= 81.0)
cout << "middle" << endl;
else if (81.0 < w && w <= 91.0)
cout << "light heavy" << endl;
else if (91.0 < w)
cout << "heavy" << endl;
}
return 0;
}
|
[["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 18]]
| 1
| 234
|
#include <iostream>
using namespace std;
int main() {
double x;
while (cin >> x) {
if (x <= 48.00)
cout << "light fly" << endl;
else if (x <= 51.00)
cout << "fly" << endl;
else if (x <= 54.00)
cout << "bantam" << endl;
else if (x <= 57.00)
cout << "feather" << endl;
else if (x <= 60.00)
cout << "light" << endl;
else if (x <= 64.00)
cout << "light welter" << endl;
else if (x <= 69.00)
cout << "welter" << endl;
else if (x <= 75.00)
cout << "light middle" << endl;
else if (x <= 81.00)
cout << "middle" << endl;
else if (x <= 91.00)
cout << "light heavey" << endl;
else
cout << "heavy" << endl;
}
}
|
#include <iostream>
using namespace std;
int main() {
double x;
while (cin >> x) {
if (x <= 48.00)
cout << "light fly" << endl;
else if (x <= 51.00)
cout << "fly" << endl;
else if (x <= 54.00)
cout << "bantam" << endl;
else if (x <= 57.00)
cout << "feather" << endl;
else if (x <= 60.00)
cout << "light" << endl;
else if (x <= 64.00)
cout << "light welter" << endl;
else if (x <= 69.00)
cout << "welter" << endl;
else if (x <= 75.00)
cout << "light middle" << endl;
else if (x <= 81.00)
cout << "middle" << endl;
else if (x <= 91.00)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
}
|
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 181
|
#include <iostream>
#include <string>
using namespace std;
int main() {
const string Class[11] = {"light fly", "fly", "bantam",
"feather", "light", "light welter",
"welter", "light middle", "middle",
"light heavy", "heavy"};
const double Class_Weight[12] = {0.0, 48.0, 51.0, 54.0, 57.0, 60.0,
64.0, 69.0, 75.0, 81.0, 91.0, 1000.0};
const int DATASETS = 1000;
double Weight[DATASETS];
int C = 0;
while (cin >> Weight[C]) {
C++;
}
for (int i = 0; i < C; i++) {
for (int j = 0; j < 11; j++) {
if (Class_Weight[j] <= Weight[i] && Weight[i] < Class_Weight[j + 1]) {
cout << Class[j] << endl;
}
}
}
return 0;
}
|
#include <iostream>
#include <string>
using namespace std;
int main() {
const string Class[11] = {"light fly", "fly", "bantam",
"feather", "light", "light welter",
"welter", "light middle", "middle",
"light heavy", "heavy"};
const double Class_Weight[12] = {0.0, 48.0, 51.0, 54.0, 57.0, 60.0,
64.0, 69.0, 75.0, 81.0, 91.0, 1000.0};
const int DATASETS = 1000;
double Weight[DATASETS];
int C = 0;
while (cin >> Weight[C]) {
C++;
}
for (int i = 0; i < C; i++) {
for (int j = 0; j < 11; j++) {
if (Class_Weight[j] < Weight[i] && Weight[i] <= Class_Weight[j + 1]) {
cout << Class[j] << endl;
}
}
}
return 0;
}
|
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]]
| 1
| 201
|
#include <iostream>
#include <string>
using namespace std;
double x[11] = {48, 51, 54, 57, 60, 64, 69, 75, 81, 90, 1000000000}, a;
string S[11] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
int main() {
while (cin >> a) {
for (int i = 0; i < 11; i++) {
if (a <= x[i]) {
cout << S[i] << endl;
break;
}
}
}
}
|
#include <iostream>
#include <string>
using namespace std;
double x[11] = {48, 51, 54, 57, 60, 64, 69, 75, 81, 91, 1000000000}, a;
string S[11] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
int main() {
while (cin >> a) {
for (int i = 0; i < 11; i++) {
if (a <= x[i]) {
cout << S[i] << endl;
break;
}
}
}
}
|
[["-", 0, 30, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 83, 0, 13]]
| 1
| 144
|
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
int main() {
double n;
while (cin >> n) {
if (n <= 48.0)
cout << "light fly" << endl;
else if (n <= 51.0)
cout << "fly" << endl;
else if (n <= 54.0)
cout << "bantam" << endl;
else if (n <= 57.0)
cout << "feather" << endl;
else if (n <= 60.0)
cout << "light" << endl;
else if (n <= 64.0)
cout << "light weiter" << endl;
else if (n <= 69.0)
cout << "weiter" << endl;
else if (n <= 75.0)
cout << "light middle" << endl;
else if (n <= 81.0)
cout << "middle" << endl;
else if (n <= 91.0)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
}
|
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
int main() {
double n;
while (cin >> n) {
if (n <= 48.0)
cout << "light fly" << endl;
else if (n <= 51.0)
cout << "fly" << endl;
else if (n <= 54.0)
cout << "bantam" << endl;
else if (n <= 57.0)
cout << "feather" << endl;
else if (n <= 60.0)
cout << "light" << endl;
else if (n <= 64.0)
cout << "light welter" << endl;
else if (n <= 69.0)
cout << "welter" << endl;
else if (n <= 75.0)
cout << "light middle" << endl;
else if (n <= 81.0)
cout << "middle" << endl;
else if (n <= 91.0)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
}
|
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 199
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48) {
printf("light fly");
} else if (weight <= 51) {
printf("fly");
} else if (weight <= 54) {
printf("bantam");
} else if (weight <= 57) {
printf("feather");
} else if (weight <= 60) {
printf("light");
} else if (weight <= 64) {
printf("light welter");
} else if (weight <= 69) {
printf("welter");
} else if (weight <= 75) {
printf("light middle");
} else if (weight <= 81) {
printf("middle");
} else if (weight <= 91) {
printf("little heavy");
} else {
printf("heavy");
}
printf("\n");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48) {
printf("light fly");
} else if (weight <= 51) {
printf("fly");
} else if (weight <= 54) {
printf("bantam");
} else if (weight <= 57) {
printf("feather");
} else if (weight <= 60) {
printf("light");
} else if (weight <= 64) {
printf("light welter");
} else if (weight <= 69) {
printf("welter");
} else if (weight <= 75) {
printf("light middle");
} else if (weight <= 81) {
printf("middle");
} else if (weight <= 91) {
printf("light heavy");
} else {
printf("heavy");
}
printf("\n");
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 207
|
#define _CRT_SECURE_NO_WARNINGS 1
#include <algorithm>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define M_PI 3.141592
#define toRad 2.0 * M_PI / 360.0
#define inin(x) \
int x; \
cin >> x;
#define all(x) x.begin(), x.end()
#define debug(x) cout << #x << " " << x << endl;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
typedef pair<int, int> pii;
int main() {
double a[11] = {48, 51, 54, 57, 60, 64, 69, 75, 81, 91, 9999999999999};
string s[11] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "light middle", "middle",
"light heavy", "heavy"};
double x;
while (cin >> x) {
for (int i = 0; i < 11; i++) {
if (x <= a[i]) {
cout << s[i] << endl;
break;
}
}
}
}
|
#define _CRT_SECURE_NO_WARNINGS 1
#include <algorithm>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define M_PI 3.141592
#define toRad 2.0 * M_PI / 360.0
#define inin(x) \
int x; \
cin >> x;
#define all(x) x.begin(), x.end()
#define debug(x) cout << #x << " " << x << endl;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
typedef pair<int, int> pii;
int main() {
double a[11] = {48, 51, 54, 57, 60, 64, 69, 75, 81, 91, 9999999999999};
string s[11] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
double x;
while (cin >> x) {
for (int i = 0; i < 11; i++) {
if (x <= a[i]) {
cout << s[i] << endl;
break;
}
}
}
}
|
[["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 62], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 21]]
| 1
| 204
|
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
string s[11] = {
"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy",
};
int a[12] = {0, 48, 51, 54, 57, 60, 64, 69, 75, 81, 91, INT_MAX};
for (double b; cin >> b;)
for (int i = 0; i < 11; i++)
if (a[i] <= b && b < a[i + 1]) {
cout << s[i] << endl;
break;
}
return 0;
}
|
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
string s[11] = {
"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy",
};
int a[12] = {0, 48, 51, 54, 57, 60, 64, 69, 75, 81, 91, INT_MAX};
for (double b; cin >> b;)
for (int i = 0; i < 11; i++)
if (a[i] < b && b <= a[i + 1]) {
cout << s[i] << endl;
break;
}
return 0;
}
|
[["-", 8, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["+", 8, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["-", 8, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 8, 57, 15, 339, 51, 16, 12, 16, 17, 19]]
| 1
| 187
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define CI cin >>
#define CO cout <<
#define E << endl;
using namespace std;
typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
double V = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;
string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;
int sum = 0;
vector<int> value;
vector<int> weight;
int dp[110][10010];
int data_[210][2] = {-2};
void input(void) { return; }
int main(void) {
double x_;
while (scanf("%lf", &x_) != EOF) {
if (x_ <= 48.00) {
CO "light fly" E
}
if (x_ > 48.00 && x_ <= 51.00) {
CO "fly" E
}
if (x_ > 51.00 && x_ <= 54.00) {
CO "bantam" E
}
if (x_ > 54.00 && x_ <= 57.00) {
CO "feather" E
}
if (x_ > 57.00 && x_ <= 60.00) {
CO "light" E
}
if (x_ > 6000 && x_ <= 64.00) {
CO "light welter" E
}
if (x_ > 64.00 && x_ <= 69.00) {
CO "welter" E
}
if (x_ > 69.00 && x_ <= 75.00) {
CO "light middle" E
}
if (x_ > 75.00 && x_ <= 81.00) {
CO "middle" E
}
if (x_ > 81.00 && x_ <= 91.00) {
CO "light heavy" E
}
if (x_ > 91.00) {
CO "heavy" E
}
}
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define CI cin >>
#define CO cout <<
#define E << endl;
using namespace std;
typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
double V = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;
string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;
int sum = 0;
vector<int> value;
vector<int> weight;
int dp[110][10010];
int data_[210][2] = {-2};
void input(void) { return; }
int main(void) {
double x_;
while (scanf("%lf", &x_) != EOF) {
if (x_ <= 48.00) {
CO "light fly" E
}
if (x_ > 48.00 && x_ <= 51.00) {
CO "fly" E
}
if (x_ > 51.00 && x_ <= 54.00) {
CO "bantam" E
}
if (x_ > 54.00 && x_ <= 57.00) {
CO "feather" E
}
if (x_ > 57.00 && x_ <= 60.00) {
CO "light" E
}
if (x_ > 60.00 && x_ <= 64.00) {
CO "light welter" E
}
if (x_ > 64.00 && x_ <= 69.00) {
CO "welter" E
}
if (x_ > 69.00 && x_ <= 75.00) {
CO "light middle" E
}
if (x_ > 75.00 && x_ <= 81.00) {
CO "middle" E
}
if (x_ > 81.00 && x_ <= 91.00) {
CO "light heavy" E
}
if (x_ > 91.00) {
CO "heavy" E
}
}
return 0;
}
|
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
| 1
| 504
|
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i, n) for (i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> P;
string str;
int main() {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48.0)
cout << "light fly" << endl;
else if (weight <= 51.0)
cout << "fly" << endl;
else if (weight <= 54.0)
cout << "bantam" << endl;
else if (weight <= 57.0)
cout << "feather" << endl;
else if (weight <= 60.0)
cout << "light" << endl;
else if (weight <= 64.0)
cout << "light welter" << endl;
else if (weight <= 69.0)
cout << "welter" << endl;
else if (weight <= 75.0)
cout << "light middle" << endl;
else if (weight <= 81.0)
cout << "middle" << endl;
else if (weight <= 91.0)
cout << "light heavy" << endl;
else
cout << "hevy" << endl;
}
}
|
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i, n) for (i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> P;
string str;
int main() {
double weight;
while (scanf("%lf", &weight) != EOF) {
if (weight <= 48.0)
cout << "light fly" << endl;
else if (weight <= 51.0)
cout << "fly" << endl;
else if (weight <= 54.0)
cout << "bantam" << endl;
else if (weight <= 57.0)
cout << "feather" << endl;
else if (weight <= 60.0)
cout << "light" << endl;
else if (weight <= 64.0)
cout << "light welter" << endl;
else if (weight <= 69.0)
cout << "welter" << endl;
else if (weight <= 75.0)
cout << "light middle" << endl;
else if (weight <= 81.0)
cout << "middle" << endl;
else if (weight <= 91.0)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
}
|
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 237
|
#define scanf_s scanf
//#define gets_s gets
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
#define MIN 40
#define MAX 1000000
int main(void) {
char *C[] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
double x, w[12] = {0, 48, 51, 54, 57, 60, 64, 69, 75, 81, 91};
while (scanf_s("%lf", &x) != EOF) {
for (int i = 1; i < 12; ++i) {
if (w[i - 1] < x && x <= w[i]) {
printf("%s\n", C[i - 1]);
break;
}
}
}
}
|
#define scanf_s scanf
//#define gets_s gets
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
#define MIN 39
#define MAX 150
int main(void) {
char *C[] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
double x, w[12] = {MIN, 48, 51, 54, 57, 60, 64, 69, 75, 81, 91, MAX};
while (scanf_s("%lf", &x) != EOF) {
for (int i = 1; i < 12; ++i) {
if (w[i - 1] < x && x <= w[i]) {
printf("%s\n", C[i - 1]);
break;
}
}
}
}
|
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 21]]
| 1
| 182
|
#include <iostream>
using namespace std;
int main() {
double w;
while (cin >> w) {
if (w > 91) {
cout << "heavy" << endl;
} else if (w > 81) {
cout << "light heavy" << endl;
} else if (w > 75) {
cout << "middle" << endl;
} else if (w > 69) {
cout << "light middle" << endl;
} else if (w > 64) {
cout << "waiter" << endl;
} else if (w > 60) {
cout << "light weiter" << endl;
} else if (w > 57) {
cout << "light" << endl;
} else if (w > 54) {
cout << "feather" << endl;
} else if (w > 51) {
cout << "bantam" << endl;
} else if (w > 48) {
cout << "fly" << endl;
} else {
cout << "light fly" << endl;
}
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
double w;
while (cin >> w) {
if (w > 91) {
cout << "heavy" << endl;
} else if (w > 81) {
cout << "light heavy" << endl;
} else if (w > 75) {
cout << "middle" << endl;
} else if (w > 69) {
cout << "light middle" << endl;
} else if (w > 64) {
cout << "welter" << endl;
} else if (w > 60) {
cout << "light welter" << endl;
} else if (w > 57) {
cout << "light" << endl;
} else if (w > 54) {
cout << "feather" << endl;
} else if (w > 51) {
cout << "bantam" << endl;
} else if (w > 48) {
cout << "fly" << endl;
} else {
cout << "light fly" << endl;
}
}
return 0;
}
|
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 206
|
#include <cstdio>
#include <iostream>
using namespace std;
#define int long long
signed main() {
float a;
while (scanf("%f", &a) != EOF) {
if (a <= 48)
cout << "light fly" << endl;
else if (a <= 51)
cout << "fly" << endl;
else if (a <= 54)
cout << "feather" << endl;
else if (a <= 57)
cout << "bantam" << endl;
else if (a <= 60)
cout << "light" << endl;
else if (a <= 64)
cout << "light welter" << endl;
else if (a <= 69)
cout << "welter" << endl;
else if (a <= 75)
cout << "light middle" << endl;
else if (a <= 81)
cout << "middle" << endl;
else if (a <= 91)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
return 0;
}
|
#include <cstdio>
#include <iostream>
using namespace std;
#define int long long
signed main() {
float a;
while (scanf("%f", &a) != EOF) {
if (a <= 48)
cout << "light fly" << endl;
else if (a <= 51)
cout << "fly" << endl;
else if (a <= 54)
cout << "bantam" << endl;
else if (a <= 57)
cout << "feather" << endl;
else if (a <= 60)
cout << "light" << endl;
else if (a <= 64)
cout << "light welter" << endl;
else if (a <= 69)
cout << "welter" << endl;
else if (a <= 75)
cout << "light middle" << endl;
else if (a <= 81)
cout << "middle" << endl;
else if (a <= 91)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
return 0;
}
|
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 197
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double a;
while (cin >> a) {
if (a <= 48.00)
printf("light fly\n");
else if (a <= 51.00)
printf("fly\n");
else if (a <= 54.00)
printf("bantam\n");
else if (a <= 57.00)
printf("feather\n");
else if (a <= 60.00)
printf("light\n");
else if (a <= 64.00)
printf("light welter\n");
else if (a <= 69.00)
printf("welter\n");
else if (a <= 75.00)
printf("light middle\n");
else if (a <= 81.00)
printf("middle\n");
else if (a <= 91.00)
printf("light heavy\n");
else
("heavy\n");
}
return (0);
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double a;
while (cin >> a) {
if (a <= 48.00)
printf("light fly\n");
else if (a <= 51.00)
printf("fly\n");
else if (a <= 54.00)
printf("bantam\n");
else if (a <= 57.00)
printf("feather\n");
else if (a <= 60.00)
printf("light\n");
else if (a <= 64.00)
printf("light welter\n");
else if (a <= 69.00)
printf("welter\n");
else if (a <= 75.00)
printf("light middle\n");
else if (a <= 81.00)
printf("middle\n");
else if (a <= 91.00)
printf("light heavy\n");
else
printf("heavy\n");
}
return (0);
}
|
[["+", 0, 57, 75, 76, 0, 1, 0, 2, 63, 22]]
| 1
| 185
|
#include <iostream>
using namespace std;
int main(void) {
double w;
while (cin >> w) {
if (w <= 48) {
cout << "light fly" << endl;
} else if (w > 48 && w <= 51) {
cout << "fly";
} else if (w > 51 && w <= 54) {
cout << "bantam";
} else if (w > 54 && w <= 57) {
cout << "feather";
} else if (w > 57 && w <= 60) {
cout << "light";
} else if (w > 60 && w <= 64) {
cout << "light welter";
} else if (w > 64 && w <= 69) {
cout << "welter";
} else if (w > 69 && w <= 75) {
cout << "light middle";
} else if (w > 75 && w <= 81) {
cout << "middle";
} else if (w > 81 && w <= 91) {
cout << "light heavy";
} else if (w > 91) {
cout << "heavy";
}
cout << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main(void) {
double w;
while (cin >> w) {
if (w <= 48) {
cout << "light fly";
} else if (w > 48 && w <= 51) {
cout << "fly";
} else if (w > 51 && w <= 54) {
cout << "bantam";
} else if (w > 54 && w <= 57) {
cout << "feather";
} else if (w > 57 && w <= 60) {
cout << "light";
} else if (w > 60 && w <= 64) {
cout << "light welter";
} else if (w > 64 && w <= 69) {
cout << "welter";
} else if (w > 69 && w <= 75) {
cout << "light middle";
} else if (w > 75 && w <= 81) {
cout << "middle";
} else if (w > 81 && w <= 91) {
cout << "light heavy";
} else if (w > 91) {
cout << "heavy";
}
cout << endl;
}
return 0;
}
|
[["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22]]
| 1
| 233
|
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
string s[11] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
double g[] = {48.0, 51.0, 54.0, 57.0, 60.0, 64.0, 69.0, 75.0, 81.0, 91.0};
int main() {
double n;
while (cin >> n) {
int m;
for (m = 0; m < 11 && n > g[m]; m++)
;
cout << s[m] << endl;
}
return 0;
}
/*
60.2
70.2
48.0
80.2
*/
|
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
string s[11] = {"light fly", "fly", "bantam", "feather",
"light", "light welter", "welter", "light middle",
"middle", "light heavy", "heavy"};
double g[] = {48.0, 51.0, 54.0, 57.0, 60.0, 64.0, 69.0, 75.0, 81.0, 91.0};
int main() {
double n;
while (cin >> n) {
int m;
for (m = 0; m < 10 && n > g[m]; m++)
;
cout << s[m] << endl;
}
return 0;
}
/*
60.2
70.2
48.0
80.2
*/
|
[["-", 8, 9, 0, 7, 15, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 12, 13]]
| 1
| 143
|
#include <iostream>
using namespace std;
int main(void) {
double weight;
while (cin >> weight) {
if (weight <= 48.0)
cout << "light fly" << endl;
else if (weight <= 51.0)
cout << "fly" << endl;
else if (weight <= 54.0)
cout << "bantam" << endl;
else if (weight <= 57.0)
cout << "feather" << endl;
else if (weight <= 60.0)
cout << "light" << endl;
else if (weight <= 64.0)
cout << "light welter" << endl;
else if (weight <= 69.0)
cout << "welter" << endl;
else if (weight <= 75.0)
cout << "lgiht middle" << endl;
else if (weight <= 81.0)
cout << "middle" << endl;
else if (weight <= 91.0)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main(void) {
double weight;
while (cin >> weight) {
if (weight <= 48.0)
cout << "light fly" << endl;
else if (weight <= 51.0)
cout << "fly" << endl;
else if (weight <= 54.0)
cout << "bantam" << endl;
else if (weight <= 57.0)
cout << "feather" << endl;
else if (weight <= 60.0)
cout << "light" << endl;
else if (weight <= 64.0)
cout << "light welter" << endl;
else if (weight <= 69.0)
cout << "welter" << endl;
else if (weight <= 75.0)
cout << "light middle" << endl;
else if (weight <= 81.0)
cout << "middle" << endl;
else if (weight <= 91.0)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
return 0;
}
|
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 185
|
#include <iostream>
using namespace std;
main() {
double d;
while (cin >> d) {
cout
<< ((d <= 48)
? "light fly"
: ((d <= 51)
? "fly"
: ((d <= 54)
? "bantam"
: ((d <= 57)
? "feather"
: ((d <= 60)
? "light"
: ((d <= 64)
? "light welter"
: ((d <= 69)
? "welter"
: ((d <= 75)
? "light "
"middle"
: ((d <= 81)
? "midd"
"le"
: ((d <=
91)
? "light heavy"
: "beavy"))))))))))
<< endl;
}
}
|
#include <iostream>
using namespace std;
main() {
double d;
while (cin >> d) {
cout
<< ((d <= 48)
? "light fly"
: ((d <= 51)
? "fly"
: ((d <= 54)
? "bantam"
: ((d <= 57)
? "feather"
: ((d <= 60)
? "light"
: ((d <= 64)
? "light welter"
: ((d <= 69)
? "welter"
: ((d <= 75)
? "light "
"middle"
: ((d <= 81)
? "midd"
"le"
: ((d <=
91)
? "light heavy"
: "heavy"))))))))))
<< endl;
}
}
|
[["-", 0, 41, 75, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 41, 75, 23, 0, 41, 75, 5, 0, 6]]
| 1
| 156
|
#include <iostream>
using namespace std;
int main() {
double n;
while (cin >> n && n) {
if (n > 91.00)
cout << "heavy" << endl;
else if (n > 81.00)
cout << "light middle" << endl;
else if (n > 75.00)
cout << "middle" << endl;
else if (n > 69.00)
cout << "light middle" << endl;
else if (n > 64.00)
cout << "welter" << endl;
else if (n > 60.00)
cout << "light welter" << endl;
else if (n > 57.00)
cout << "light" << endl;
else if (n > 54.00)
cout << "feather" << endl;
else if (n > 51.00)
cout << "bantam" << endl;
else if (n > 48.00)
cout << "fly" << endl;
else
cout << "light fly" << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
double n;
while (cin >> n) {
if (n > 91.00)
cout << "heavy" << endl;
else if (n > 81.00)
cout << "light heavy" << endl;
else if (n > 75.00)
cout << "middle" << endl;
else if (n > 69.00)
cout << "light middle" << endl;
else if (n > 64.00)
cout << "welter" << endl;
else if (n > 60.00)
cout << "light welter" << endl;
else if (n > 57.00)
cout << "light" << endl;
else if (n > 54.00)
cout << "feather" << endl;
else if (n > 51.00)
cout << "bantam" << endl;
else if (n > 48.00)
cout << "fly" << endl;
else
cout << "light fly" << endl;
}
return 0;
}
|
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 186
|
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v, i) (v).erase(remove(all(v), i), (v).end())
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define each(c, it) \
for (typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define debug(x) cerr << #x << " = " << (x) << endl;
#define LINE cerr << "LINE: " << __LINE__ << endl;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
template <class T> void preview(T a, T b) {
for (T it = a; it != b; ++it)
cerr << *it << " ";
cerr << endl;
}
const int INF = 100000000;
const double PI = acos(-1.0), EPS = 1e-10;
int main() {
for (double d; cin >> d;) {
string s;
if (d <= 48.00)
s = "light fly";
else if (d <= 51.00)
s = "fly";
else if (d <= 54.00)
s = "bantam";
else if (d <= 57.00)
s = "feather";
else if (d <= 60.00)
s = "light";
else if (d <= 64.00)
s = "lighy welter";
else if (d <= 69.00)
s = "welter";
else if (d <= 75.00)
s = "light middle";
else if (d <= 81.00)
s = "middle";
else if (d <= 91.00)
s = "light heavy";
else
s = "heavy";
cout << s << endl;
}
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v, i) (v).erase(remove(all(v), i), (v).end())
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define each(c, it) \
for (typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define debug(x) cerr << #x << " = " << (x) << endl;
#define LINE cerr << "LINE: " << __LINE__ << endl;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
template <class T> void preview(T a, T b) {
for (T it = a; it != b; ++it)
cerr << *it << " ";
cerr << endl;
}
const int INF = 100000000;
const double PI = acos(-1.0), EPS = 1e-10;
int main() {
for (double d; cin >> d;) {
string s;
if (d <= 48.00)
s = "light fly";
else if (d <= 51.00)
s = "fly";
else if (d <= 54.00)
s = "bantam";
else if (d <= 57.00)
s = "feather";
else if (d <= 60.00)
s = "light";
else if (d <= 64.00)
s = "light welter";
else if (d <= 69.00)
s = "welter";
else if (d <= 75.00)
s = "light middle";
else if (d <= 81.00)
s = "middle";
else if (d <= 91.00)
s = "light heavy";
else
s = "heavy";
cout << s << endl;
}
return 0;
}
|
[["-", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6]]
| 1
| 381
|
#include <iostream>
using namespace std;
int main() {
double n;
while (cin >> n) {
if (n <= 48.0)
cout << "light fly" << endl;
else if (n <= 51.0)
cout << "fly" << endl;
else if (n <= 54.0)
cout << "bantam" << endl;
else if (n <= 57.0)
cout << "feather" << endl;
else if (n <= 60.0)
cout << "light" << endl;
else if (n <= 64.0)
cout << "light welther" << endl;
else if (n <= 69.0)
cout << "welter" << endl;
else if (n <= 75.0)
cout << "light middle" << endl;
else if (n <= 81.0)
cout << "middle" << endl;
else if (n <= 91.0)
cout << "light heavy" << endl;
else {
cout << "heavy" << endl;
}
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
double n;
while (cin >> n) {
if (n <= 48.0)
cout << "light fly" << endl;
else if (n <= 51.0)
cout << "fly" << endl;
else if (n <= 54.0)
cout << "bantam" << endl;
else if (n <= 57.0)
cout << "feather" << endl;
else if (n <= 60.0)
cout << "light" << endl;
else if (n <= 64.0)
cout << "light welter" << endl;
else if (n <= 69.0)
cout << "welter" << endl;
else if (n <= 75.0)
cout << "light middle" << endl;
else if (n <= 81.0)
cout << "middle" << endl;
else if (n <= 91.0)
cout << "light heavy" << endl;
else {
cout << "heavy" << endl;
}
}
}
|
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]]
| 1
| 186
|
#include <iostream>
using namespace std;
int main() {
double n;
while (cin >> n) {
if (n <= 48.0)
cout << "light fly" << endl;
else if (n <= 51.0)
cout << "fly" << endl;
else if (n <= 54.0)
cout << "bantam" << endl;
else if (n <= 57.0)
cout << "feather" << endl;
else if (n <= 60.0)
cout << "light" << endl;
else if (n <= 64.0)
cout << "light welther" << endl;
else if (n <= 69.0)
cout << "welter" << endl;
else if (n <= 75.0)
cout << "light middle" << endl;
else if (n <= 81.0)
cout << "middle" << endl;
else if (n <= 91.0)
cout << "light heavy" << endl;
else {
cout << "heavy" << endl;
}
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
double n;
while (cin >> n) {
if (n <= 48.0)
cout << "light fly" << endl;
else if (n <= 51.0)
cout << "fly" << endl;
else if (n <= 54.0)
cout << "bantam" << endl;
else if (n <= 57.0)
cout << "feather" << endl;
else if (n <= 60.0)
cout << "light" << endl;
else if (n <= 64.0)
cout << "light welter" << endl;
else if (n <= 69.0)
cout << "welter" << endl;
else if (n <= 75.0)
cout << "light middle" << endl;
else if (n <= 81.0)
cout << "middle" << endl;
else if (n <= 91.0)
cout << "light heavy" << endl;
else {
cout << "heavy" << endl;
}
}
return 0;
}
|
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 186
|
#include <iostream>
using namespace std;
int main() {
double n;
while (cin >> n) {
if (n <= 48.0)
cout << "light fly" << endl;
else if (n <= 51.0)
cout << "fly" << endl;
else if (n <= 54.0)
cout << "bantam" << endl;
else if (n <= 57.0)
cout << "feather" << endl;
else if (n <= 60.0)
cout << "light" << endl;
else if (n <= 64.0)
cout << "light welther" << endl;
else if (n <= 69.0)
cout << "welter" << endl;
else if (n <= 75.0)
cout << "light middle" << endl;
else if (n <= 81.0)
cout << "middle" << endl;
else if (n <= 91.0)
cout << "light heavy" << endl;
else {
cout << "heavy" << endl;
}
}
}
|
#include <iostream>
using namespace std;
int main() {
double n;
while (cin >> n) {
if (n <= 48.0)
cout << "light fly" << endl;
else if (n <= 51.0)
cout << "fly" << endl;
else if (n <= 54.0)
cout << "bantam" << endl;
else if (n <= 57.0)
cout << "feather" << endl;
else if (n <= 60.0)
cout << "light" << endl;
else if (n <= 64.0)
cout << "light welter" << endl;
else if (n <= 69.0)
cout << "welter" << endl;
else if (n <= 75.0)
cout << "light middle" << endl;
else if (n <= 81.0)
cout << "middle" << endl;
else if (n <= 91.0)
cout << "light heavy" << endl;
else
cout << "heavy" << endl;
}
}
|
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 75, 76, 0, 57, 75, 76, 0, 9, 0, 46]]
| 1
| 183
|
#include <iostream>
#include <string>
using namespace std;
string whatclass(double d) {
string s;
if (d <= 48) {
s = "lignt fly";
} else if (d <= 51) {
s = "fly";
} else if (d <= 54) {
s = "bantam";
} else if (d <= 57) {
s = "feather";
} else if (d <= 60) {
s = "light";
} else if (d <= 64) {
s = "light welter";
} else if (d <= 69) {
s = "welter";
} else if (d <= 75) {
s = "light middle";
} else if (d <= 81) {
s = "middle";
} else if (d <= 91) {
s = "light heavy";
} else {
s = "heavy";
}
return s;
}
int main() {
double in;
while (cin >> in) {
cout << whatclass(in) << endl;
}
}
|
#include <iostream>
#include <string>
using namespace std;
string whatclass(double d) {
string s;
if (d <= 48) {
s = "light fly";
} else if (d <= 51) {
s = "fly";
} else if (d <= 54) {
s = "bantam";
} else if (d <= 57) {
s = "feather";
} else if (d <= 60) {
s = "light";
} else if (d <= 64) {
s = "light welter";
} else if (d <= 69) {
s = "welter";
} else if (d <= 75) {
s = "light middle";
} else if (d <= 81) {
s = "middle";
} else if (d <= 91) {
s = "light heavy";
} else {
s = "heavy";
}
return s;
}
int main() {
double in;
while (cin >> in) {
cout << whatclass(in) << endl;
}
}
|
[["-", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6]]
| 1
| 206
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.