Problem:


階級

ボクシングは体重によって階級が分けられています。体重を読み込んで、その階級を出力するプログラムを作成してください。階級と体重の関係は以下の表のとおりとします。

階級体重（kg）

light fly48.00kg 以下

fly48.00kg 超 51.00kg 以下

bantam51.00kg 超 54.00kg 以下

feather54.00kg 超 57.00kg 以下

light57.00kg 超 60.00kg 以下

light welter60.00kg 超 64.00kg 以下

welter64.00kg 超 69.00 kg 以下

light middle69.00kg 超 75.00 kg 以下

middle75.00kg 超 81.00 kg 以下

light heavy81.00kg 超 91.00 kg 以下

heavy91.00kg 超

Input

入力は複数のデータセットからなります。各データセットとして、体重を表す１つの実数 w (40 ≤ w ≤ 150) が１行に与えられます。データセットの数は 50 を超えません。

Output

データセットごとに、対応する階級を１行に出力します。

Sample Input

60.2
70.2
48.0
80.2

Output for the Sample Input

light welter
light middle
light fly
middle



Sample input:
60.2
70.2
48.0
80.2


Sample output:
light welter
light middle
light fly
middle

Submission status: Accepted

Solution code:
level = {'0':'light fly','48':'fly','51':'bantam','54':'feather','57':'light','60':'light welter',
'64':'welter','69':'light middle','75':'middle','81':'light heavy','91':'heavy'}
weight = [eval(x) for x in list(level.keys())]
weight.sort()
weight.reverse()
while True:
	try:
		w = eval(input())
		for i in range(len(weight)):
			if w > weight[i]:
				print(level[str(weight[i])])
				break
	except EOFError:
		break;

Submission status: Accepted

Solution code:
while True:
  try:
   w=float(input())
   if w<=48:
    judge='light fly'
   elif 48<=w<=51:
    judge='fly'
   elif 51<=w<=54:
    judge='bantam'
   elif 54<=w<=57:
    judge='feather'
   elif 57<=w<=60:
    judge='light'
   elif 60<=w<=64:
    judge='light welter'
   elif 64<=w<=69:
    judge='welter'
   elif 69<=w<=75:
    judge='light middle'
   elif 75<=w<=81:
    judge='middle'
   elif 81<=w<=91:
    judge='light heavy'
   else:
    judge='heavy'  
   print(judge)
  except EOFError:
   break

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    if line == "\n":
        break
    w = float(line)
    if w <= 48:
        print("light fly")
    elif w <= 51:
        print("fly")
    elif w <= 54:
        print("bantam")
    elif w <= 57:
        print("feather")
    elif w <= 60:
        print("light")
    elif w <= 64:
        print("light welter")
    elif w <= 69:
        print("welter")
    elif w <= 75:
        print("light middle")
    elif w <= 81:
        print("middle")
    elif w <= 91:
        print("light heavy")
    else:
        print("heavy")

Submission status: Accepted

Solution code:
# Aizu Problem 0048: Class
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")

CLASSES = [[48, "light fly"], [51, "fly"], [54, "bantam"], [57, "feather"],
           [60, "light"], [64, "light welter"], [69, "welter"],
           [75, "light middle"], [81, "middle"], [91, "light heavy"],
           [1000, "heavy"]]

for line in sys.stdin:
    w = float(line)
    for weight, name in CLASSES:
        if w <= weight:
            print(name)
            break

Submission status: Accepted

Solution code:
class_ = {i: c for i, c in enumerate(["light fly", "fly", "bantam", "feather", "light", "light welter",
                                      "welter", "light middle", "middle", "light heavy", "heavy"])}
while True:
    try:
        w = float(input())
    except:
        break
    for i, c in enumerate([48.0, 51.0, 54.0, 57.0, 60.0, 64.0, 69.0, 75.0, 81.0, 91.0, 150.0]):
        if w <= c:
            print(class_[i])
            break

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
  try:
    value = float(line)
    if value <= 48.00:
      print("light fly")
    elif value <= 51.00:
      print("fly")
    elif value <= 54.00:
      print("bantam")
    elif value <= 57.00:
      print("feather")
    elif value <= 60.00:
      print("light")
    elif value <= 64.00:
      print("light welter")
    elif value <= 69.00:
      print("welter")
    elif value <= 75.00:
      print("light middle")
    elif value <= 81.00:
      print("middle")
    elif value <= 91.00:
      print("light heavy")
    else:
      print("heavy")
  except:
    break

Submission status: Accepted

Solution code:
import sys
import os

def main():
    for s in sys.stdin:
        s = float(s)
        if s  <= 48.0:
            print('light fly')
        elif s <= 51.0:
            print('fly')
        elif s <= 54.0:
            print('bantam')
        elif s <= 57.0:
            print('feather')
        elif s <= 60.0:
            print('light')
        elif s <= 64.0:
            print('light welter')
        elif s <= 69.0:
            print('welter')
        elif s <= 75.0:
            print('light middle')
        elif s <= 81.0:
            print('middle')
        elif s <= 91.0:
            print('light heavy')
        else:
            print('heavy')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
while True:
    try:
        a=float(input())
        if a<=48:
            print("light fly")
        elif a>48 and a<=51:
            print("fly")
        elif a>51 and a<=54:
            print("bantam")
        elif a>54 and a<=57:
            print("feather")
        elif a>57 and a<=60:
            print("light")
        elif a>60 and a<=64:
            print("light welter")
        elif a>64 and a<=69:
            print("welter")
        elif a>69 and a<=75:
            print("light middle")
        elif a>75 and a<=81:
            print("middle")
        elif a>81 and a<=91:
            print("light heavy")
        elif a>91:
            print("heavy")
    except:break

Submission status: Accepted

Solution code:
c_list = ["light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy"]
w_list = [48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
while True:
    try:
        w = float(input())
        for i in range(10):
            if w <= w_list[i]:
                print(c_list[i])
                break
        else:
            print("heavy")
    except:
        break

Submission status: Accepted

Solution code:
def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
for l in range(len(N)):
    w = float(N[l])
    if w <= 48.0:
        ans = "light fly"
    elif w <= 51.0:
        ans = "fly"
    elif w <= 54.0:
        ans = "bantam"
    elif w <= 57.0:
        ans = "feather"
    elif w <= 60.0:
        ans = "light"
    elif w <= 64.0:
        ans = "light welter"
    elif w <= 69.0:
        ans = "welter"
    elif w <= 75.0:
        ans = "light middle"
    elif w <= 81.0:
        ans = "middle"
    elif w <= 91.0:
        ans = "light heavy"
    else:
        ans = "heavy"
    print(ans)

Submission status: Accepted

Solution code:
import sys
for e in sys.stdin:
 e=float(e)
 h=['light ','']
 a=h[e>91]+'heavy'if e>81 else h[e>75]+'middle'if e>69 else h[e>64]+'welter'if e>60 else'light'if e>57 else'feather'if e>54 else'bantam'if e>51 else h[e>48]+'fly'
 print(a)

Submission status: Accepted

Solution code:
import sys
for e in sys.stdin:
 e=float(e)
 h=['light ','']
 a=h[e>91]+'heavy'if e>81 else h[e>75]+'middle'if e>69 else h[e>64]+'welter'if e>60 else'light'if e>57 else'feather'if e>54 else'bantam'if e>51else h[e>48]+'fly'
 print(a)

Submission status: Accepted

Solution code:
import sys
h=['light ','']
for e in sys.stdin:
 e=float(e)
 print(h[e>91]+'heavy'if e>81else h[e>75]+'middle'if e>69else h[e>64]+'welter'if e>60else'light'if e>57else'feather'if e>54else'bantam'if e>51else h[e>48]+'fly')

Submission status: Accepted

Solution code:
import sys
h=['light ','']
for e in sys.stdin:
 e=float(e)
 for i in range(7):
  if[81,69,60,57,54,51,0][i]<e:
   print([h[e>91]+'heavy',h[e>75]+'middle',h[e>64]+'welter','light','feather','bantam',h[e>48]+'fly'][i])
   break

Submission status: Accepted

Solution code:
import sys
h=['light ','']
for e in sys.stdin:
 e=float(e)
 for i in range(7):
  if[81,69,60,57,54,51,0][i]<e:
   print([h[e>91]+'heavy',h[e>75]+'middle',h[e>64]+'welter','light','feather','bantam',h[e>48]+'fly'][i]);break

Submission status: Accepted

Solution code:
import sys
h=['light ','']
for e in sys.stdin:
 e=float(e)
 for i in range(7):
  if[81,69,60,57,54,51,0][i]<e:print([h[e>91]+'heavy',h[e>75]+'middle',h[e>64]+'welter','light','feather','bantam',h[e>48]+'fly'][i]);break

Submission status: Accepted

Solution code:
import sys
h=['light ','']
for e in sys.stdin:
 e=float(e)
 for i in range(7):
  if[81,69,60,57,54,51,0][i]<e:print([h[e>91]+'heavy',h[e>75]+'middle',h[e>64]+'welter',h[0][:-1],'feather','bantam',h[e>48]+'fly'][i]);break

Submission status: Accepted

Solution code:
import bisect
w = [48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
c = ["light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"]
while 1:
    try:print(c[bisect.bisect_left(w,float(input()))])
    except:break

Submission status: Accepted

Solution code:
def put_class(n):
  if n <= 48:
    print("light fly")
  elif n <= 51:
    print("fly")
  elif n <= 54:
    print("bantam")
  elif n <= 57:
    print("feather")
  elif n <= 60:
    print("light")
  elif n <= 64:
    print("light welter")
  elif n <= 69:
    print("welter")
  elif n <= 75:
    print("light middle")
  elif n <= 81:
    print("middle")
  elif n <= 91:
    print("light heavy")
  else:
    print("heavy")

while True:
  try:
    put_class(float(input()))
  except EOFError:
    break

Submission status: Accepted

Solution code:
from decimal import Decimal
import sys

def classify(w):
    if w <= Decimal("48.00"):
        return "light fly"
    elif Decimal("48.00") < w <= Decimal("51.00"):
        return "fly"
    elif Decimal("51.00") < w <= Decimal("54.00"):
        return "bantam"
    elif Decimal("54.00") < w <= Decimal("57.00"):
        return "feather"
    elif Decimal("57.00") < w <= Decimal("60.00"):
        return "light"
    elif Decimal("60.00") < w <= Decimal("64.00"):
        return "light welter"
    elif Decimal("64.00") < w <= Decimal("69.00"):
        return "welter"
    elif Decimal("69.00") < w <= Decimal("75.00"):
        return "light middle"
    elif Decimal("75.00") < w <= Decimal("81.00"):
        return "middle"
    elif Decimal("81.00") < w <= Decimal("91.00"):
        return "light heavy"
    else:
        return "heavy"
    
[print(classify(Decimal(j))) for j in [i for i in sys.stdin]]

Submission status: Accepted

Solution code:
# AOJ 0048 Class
# Python3 2018.6.14 bal4u

r = [0.0,48.0,51.0,54.0,57.0,60.0,64.0,69.0,75.0,81.0,91.0,1000.0]
s = ["light fly","fly","bantam","feather","light","light welter","welter","light middle","middle","light heavy","heavy"]

while True:
	try:
		w = float(input())
	except EOFError:
		break
		
	for i in range(12):
		if r[i] < w and w <= r[i+1]:
		   print(s[i])
		   break

Submission status: Accepted

Solution code:
h = {48:"light fly", 51:"fly", 54:"bantam", 57:"feather", 60:"light" , 64:"light welter", 69:"welter", 75:"light middle", 81:"middle", 91:"light heavy"}
while 1:
	try: w = float(input())
	except: break
	for i, x in sorted(h.items()):
		if w <= i: 
			print(h[i])
			break
	else: print("heavy")

Submission status: Accepted

Solution code:
import sys
from bisect import bisect_left

c = ["light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"]
w = [48, 51, 54, 57, 60, 64, 69, 75, 81, 91, float("inf")]

for _w in map(float, sys.stdin.readlines()):
    print(c[bisect_left(w, _w)])

Submission status: Accepted

Solution code:
while True:
  try:
    a=float(input())
    if a <= 48: print "light fly"
    elif 48<a<=51: print "fly"
    elif 51<a<=54: print "bantam"
    elif 54<a<=57: print "feather"
    elif 57<a<=60: print "light"
    elif 60<a<=64: print "light welter"
    elif 64<a<=69: print "welter"
    elif 69<a<=75: print "light middle"
    elif 75<a<=81: print "middle"
    elif 81<a<=91: print "light heavy"
    elif 91<a: print "heavy"
  except EOFError: break

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

import sys


def get_class_by_weight(weight):
    class_name = ""
    if weight <= 48.0:
        class_name = "light fly"
    elif weight <= 51.0:
        class_name = "fly"
    elif weight <= 54.0:
        class_name = "bantam"
    elif weight <= 57.0:
        class_name = "feather"
    elif weight <= 60.0:
        class_name = "light"
    elif weight <= 64.0:
        class_name = "light welter"
    elif weight <= 69.0:
        class_name = "welter"
    elif weight <= 75.0:
        class_name = "light middle"
    elif weight <= 81.0:
        class_name = "middle"
    elif weight <= 91.0:
        class_name = "light heavy"
    else:
        class_name = "heavy"
    return class_name


def main():
    params = [float(line) for line in sys.stdin.readlines()]

    for param in params:
        print get_class_by_weight(param)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
WEIGHT=[91.0, 81.0, 75.0, 69.0, 64.0, 60.0, 57.0, 54.0, 51.0, 48.0,-1]
GRADE=['heavy', 'light heavy', 'middle', 'light middle', 'welter', 'light welter', 'light', 'feather', 'bantam', 'fly', 'light fly']
for line in sys.stdin.readlines():
    weight=float(line.strip())
    for i in xrange(len(GRADE)):
        if weight>WEIGHT[i]:
            print GRADE[i]
            break

Submission status: Accepted

Solution code:
m = [48.00, 51.00, 54.00, 57.00, 60.00,
     64.00, 69.00, 75.00, 81.00, 91.00]
n = ["light fly", "fly", "bantam",
     "feather", "light", "light welter",
     "welter", "light middle",
     "middle", "light heavy"]

while True:
    try:
        a = float(raw_input())
    except EOFError as e:
        break
    for i, o in enumerate(m):
        if a <= o:
            s = n[i]
            break
    else:
        s = "heavy"
    print s

Submission status: Accepted

Solution code:
import sys


def solv(w):
    if w <= 48.0:
        c = 'light fly'
    elif 48.0 < w <= 51.0:
        c = 'fly'
    elif 51.0 < w <= 54.0:
        c = 'bantam'
    elif 54.0 < w <= 57.0:
        c = 'feather'
    elif 57.0 < w <= 60.0:
        c = 'light'
    elif 60.0 < w <= 64.0:
        c = 'light welter'
    elif 64.0 < w <= 69.0:
        c = 'welter'
    elif 69.0 < w <= 75.0:
        c = 'light middle'
    elif 75.0 < w <= 81.0:
        c = 'middle'
    elif 81.0 < w <= 91.0:
        c = 'light heavy'
    elif 91.0 < w:
        c = 'heavy'
    else:
        pass
    return c



for line in sys.stdin:
    weight = float(line)
    print solv(weight)

Submission status: Accepted

Solution code:
def jug(a):
    if a <= 48.0:
        print "light fly"
    elif a <= 51.0:
        print "fly"
    elif a <= 54.0:
        print "bantam"
    elif a <= 57.0:
        print "feather"
    elif a <= 60.0:
        print "light"
    elif a <= 64.0:
        print "light welter"
    elif a <= 69.0:
        print 'welter'
    elif a <= 75.0:
        print "light middle"
    elif a <= 81.0:
        print "middle"
    elif a <= 91.0:
        print "light heavy"
    else:
        print "heavy"

while True:
    try:

        a = float(raw_input())
        jug(a)

    except EOFError:
        break

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin

COND = ((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'), (float('inf'), 'heavy'))

for line in stdin:
    weight = float(line)

    for base, name in COND:
        if weight <= base:
            print(name)
            break

Submission status: Accepted

Solution code:
import sys

for s in sys.stdin:
    w = float(s)
    if w <= 48:
        print 'light fly'
    elif w <= 51:
        print 'fly'
    elif w <= 54:
        print 'bantam'
    elif w <= 57:
        print 'feather'
    elif w <= 60:
        print 'light'
    elif w <= 64:
        print 'light welter'
    elif w <= 69:
        print 'welter'
    elif w <= 75:
        print 'light middle'
    elif w <= 81:
        print 'middle'
    elif w <= 91:
        print 'light heavy'
    else:
        print 'heavy'

Submission status: Accepted

Solution code:
import sys
c=["light fly", "fly", "bantam", "feather", "light", "light welter",
   "welter", "light middle", "middle", "light heavy", "heavy"]
w=[48,51,54,57,60,64,69,75,81,91]
for s in map(float,sys.stdin):
    i=0;
    for e in w:
        if e<s: i+=1
        else: break
    print c[i]

Submission status: Accepted

Solution code:
import sys

c=["light fly", "fly", "bantam", "feather", "light", "light welter",
   "welter", "light middle", "middle", "light heavy", "heavy"]
w=[48,51,54,57,60,64,69,75,81,91]
for s in map(float,sys.stdin):
    i=0
    while i<len(w) and w[i]<s:
        i+=1
    print c[i]

Submission status: Accepted

Solution code:
import sys

c=["light fly", "fly", "bantam", "feather", "light", "light welter",
   "welter", "light middle", "middle", "light heavy", "heavy"]
w=[48,51,54,57,60,64,69,75,81,91]
for s in map(float,sys.stdin):
    i=0
    for e in w:
        if e<s: i+=1
    print c[i]

Submission status: Accepted

Solution code:
while True:
    try:
        w = float(raw_input())
        if w <= 48.0:
            print  "light fly"
        elif w <= 51.0:
            print "fly"
        elif w <= 54.0:
            print "bantam"
        elif w <= 57.0:
            print "feather"
        elif w <= 60:
            print "light"
        elif w <= 64.0:
            print "light welter"
        elif w <= 69.0:
            print "welter"
        elif w <= 75.0:
            print "light middle"
        elif w <= 81.0:
            print "middle"
        elif w <= 91.0:
            print "light heavy"
        else:
            print "heavy"
    except:
        break

Submission status: Accepted

Solution code:
from bisect import *
try:
    while True:
        print ['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter',
               'welter', 'light middle', 'middle', 'light heavy', 'heavy'][bisect_left([48, 51, 54, 57, 60, 64, 69, 75, 81, 91], float(raw_input()))]
except EOFError:
    pass

Submission status: Accepted

Solution code:
rank = [0, 48, 51, 54, 57, 60, 64, 69, 75, 81, 91, 1 << 30]
rank_name = ['light fly',
             'fly',
             'bantam',
             'feather',
             'light',
             'light welter',
             'welter',
             'light middle',
             'middle',
             'light heavy',
             'heavy', ]

while 1:
    try:
        weight = input()
        for i in xrange(len(rank_name)):
            if rank[i] < weight <= rank[i + 1]:
                print rank_name[i]
                break
    except EOFError:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        w = float(input())
    except:
        break
    if w<=48.00:
        print('light fly')
    if 48.00<w<=51.00:
        print('fly')
    if 51.00<w<=54.00:
        print('bantam')
    if 54.00<w<=57.00:
        print('feather')
    if 57.00<w<=60.00:
        print('light')
    if 60.00<w<=64.00:
        print('light welter')
    if 64.00<w<=69.00:
        print('welter')
    if 69.00<w<=75.00:
        print('light middle')
    if 75.00<w<=81.00:
        print('middle')
    if 81.00<w<=91.00:
        print('light heavy')
    if 91.00<w:
        print('heavy')

Submission status: Accepted

Solution code:
while True:
    try:
        w = float(input())
        if w <= 48.0:
            print('light fly')

        elif w <= 51.0:
            print('fly')

        elif w <= 54.0:
            print('bantam')

        elif w <= 57.0:
            print('feather')

        elif w <= 60.0:
            print('light')

        elif w <= 64.0:
            print('light welter')

        elif w <= 69.0:
            print('welter')

        elif w <= 75.0:
            print('light middle')

        elif w <= 81.0:
            print('middle')

        elif w <= 91.0:
            print('light heavy')

        else:
            print('heavy')

    except EOFError:
        break

Submission status: Accepted

Solution code:
while 1:
    try:
        w = float(input())

        if w <= 48:
            print("light fly")
        elif 48 < w <= 51:
            print("fly")
        elif 51 < w <= 54:
            print("bantam")
        elif 54 < w <= 57:
            print("feather")
        elif 57 < w <= 60:
            print("light")
        elif 60 < w <= 64:
            print("light welter")
        elif 64 < w <= 69:
            print("welter")
        elif 69 < w <= 75:
            print("light middle")
        elif 75 < w <= 81:
            print("middle")
        elif 81 < w <= 91:
            print("light heavy")
        else:
            print("heavy")
    except:
        break

Submission status: Accepted

Solution code:
import sys
readlines = sys.stdin.readlines
write = sys.stdout.write
R = [
    ("light fly", 0),
    ("fly", 48),
    ("bantam", 51),
    ("feather", 54),
    ("light", 57),
    ("light welter", 60),
    ("welter", 64),
    ("light middle", 69),
    ("middle", 75),
    ("light heavy", 81),
    ("heavy", 91),
]
R.reverse()
def solve():
    for line in readlines():
        w = float(line)
        for a, b in R:
            if w > b:
                write("%s\n" % a)
                break
solve()

Submission status: Accepted

Solution code:
try: #ここから下でエラーを拾う
    while True:#無限ループ
        num = float(input()) #標準入力
        if num <= 48:print("light fly") #48以下なら"light fly"を出力する
        elif num <= 51:print("fly") #51以下なら"fly"を出力する
        elif num <= 54:print("bantam") #54以下なら"bantam"を出力する
        elif num <= 57:print("feather") #57以下なら"feather"を出力する
        elif num <= 60:print("light") #60以下なら"light"を出力する
        elif num <= 64:print("light welter")#64以下なら"light welter"を出力する
        elif num <= 69:print("welter") #69以下なら"welter"を出力する
        elif num <= 75:print("light middle") #75以下なら"light middle"を出力する
        elif num <= 81:print("middle") #81以下なら"middle"を出力する
        elif num <= 91:print("light heavy") #91以下なら"light heavy"を出力する  
        else:print("heavy") #それ以上なら"heavy"を出力する
except EOFError: #EOFErrorを拾う
    pass #処理なし

Submission status: Accepted

Solution code:
import sys

for s in sys.stdin:
    w = float(s)
    if w > 91.00:
        print('heavy')
    elif w > 81.00:
        print('light heavy')
    elif w > 75.00:
        print('middle')
    elif w > 69.00:
        print('light middle')
    elif w > 64.00:
        print('welter')
    elif w > 60.00:
        print('light welter')
    elif w > 57.00:
        print('light')
    elif w > 54.00:
        print('feather')
    elif w > 51.00:
        print('bantam')
    elif w > 48.00:
        print('fly')
    else:
        print('light fly')

Submission status: Accepted

Solution code:
try:
    while True:
        w=float(input())
        if(w<=48.00):
            print('light fly')
        elif(w>48.00 and w<=51.00):
            print('fly')
        elif(w>51.00 and w<=54.00):
            print('bantam')
        elif(w>54.00 and w<=57.00):
            print('feather')
        elif(w>57.00 and w<=60.00):
            print('light')
        elif(w>60.00 and w<=64.00):
            print('light welter')
        elif(w>64.00 and w<=69.00):
            print('welter')
        elif(w>69.00 and w<=75.00):
            print('light middle')
        elif(w>75.00 and w<=81.00):
            print('middle')
        elif(w>81.00 and w<=91.00):
            print('light heavy')
        else:
            print('heavy')
except EOFError:
    pass

Submission status: Accepted

Solution code:
a,b=['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter','welter', 'light middle', 'middle', 'light heavy', 'heavy'],[48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
while 1:
    try:
        c = float(input())
    except:break
    for i in range(10):
        if c <= b[i]:
            print(a[i])
            break
    else: print(a[10])

Submission status: Accepted

Solution code:
def class_weight(w):
    if 48.00>=w:
        print("light fly")
    elif 48.00<w<=51.00:
        print("fly")
    elif 51.00<w<=54.00:
        print("bantam")
    elif 54.00<w<=57.00:
        print("feather")
    elif 57.00<w<=60.00:
        print("light")
    elif 60.00<w<=64.00:
        print("light welter")
    elif 64.00<w<=69.00:
        print("welter")
    elif 69.00<w<=75.00:
        print("light middle")
    elif 75.00<w<=81.00:
        print("middle")
    elif 81.00<w<=91.00:
        print("light heavy")
    else:
        print("heavy")
while True:
    try:
        w=float(input())
    except:
        break
    class_weight(w)

Submission status: Accepted

Solution code:
def f(n):
    if n <= 48.0:
        print("light fly")
    elif 48< n <=51:
        print("fly")
    elif 51 < n <= 54:
        print("bantam")
    elif 54 < n <= 57:
        print("feather")
    elif 57 < n <=60:
        print("light")
    elif 60 < n <=64:
        print("light welter")
    elif 64 < n <=69:
        print("welter")
    elif 69 < n <=75:
        print("light middle")
    elif 75 < n <=81:
        print("middle")
    elif 81 < n <= 91:
        print("light heavy")
    elif n>91:
        print("heavy")


while True:
    try:
        n = float(input())
    except:
        break
    f(n)

Submission status: Accepted

Solution code:
while 1:
    try:
        n = float(input())
        if n <= 48:
            print('light fly')
        elif 48 < n and n <= 51:
            print('fly')
        elif 51 < n and n <= 54:
            print('bantam')
        elif 54 < n and n <= 57:
            print('feather')
        elif 57 < n and n <= 60:
            print('light')
        elif 60 < n and n <= 64:
            print('light welter')
        elif 64 < n and n <= 69:
            print('welter')
        elif 69 < n and n <= 75:
            print('light middle')
        elif 75 < n and n <= 81:
            print('middle')
        elif 81 < n and n <= 91:
            print('light heavy')
        elif 91 < n:
            print('heavy')
    except:
        break

Submission status: Accepted

Solution code:
while True:
    try:
        a=float(input())
        if a>91.00:
            print("heavy")
        elif 81.00<a<=91.00:
            print("light heavy")
        elif 75<a<=81:
            print("middle")
        elif 69<a<=75:
            print("light middle")
        elif 64<a<=75:
            print("welter")
        elif 60<a<=64:
            print("light welter")
        elif 57<a<=60:
            print("light")
        elif 54<a<=57:
            print("feather")
        elif 51<a<=54:
            print("bantam")
        elif 48<a<=51:
            print("fly")
        else:
            print("light fly")
    except EOFError:
        break

Submission status: Accepted

Solution code:
a,b=['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter','welter', 'light middle', 'middle', 'light heavy', 'heavy'],[48, 51, 54, 57, 60, 64, 69, 75, 81, 91]
while True:
  try:
    c = float(input())
  except:
    break
  for i in range(10):
    if c <= b[i]:
      print(a[i])
      break
  else:print(a[10])

Submission status: Accepted

Solution code:
while True:    
    try:
        w = float(input())
    except:
        break
    
    if w <= 48.00:
        print("light fly")
    elif 48.00 < w <= 51.00:
        print("fly")
    elif 51.00 < w <=54.00:
        print("bantam")
    elif 54.00 < w <= 57.00:
        print("feather")
    elif 57.00 < w <= 60.00:
        print("light")
    elif 60.00 < w <= 64.00:
        print("light welter")
    elif 64.00 < w <= 69.00:
        print("welter")
    elif 69.00 < w <=75.00:
        print("light middle")
    elif 75.00 < w <= 81.00:
        print("middle")
    elif 81.00 < w <= 91.00:
        print("light heavy")
    elif 91.00 <= w:
        print("heavy")

Submission status: Accepted

Solution code:
while True:
  try:
    w = float(input())
  except:break
  if w <= 48.0:print("light fly")
  elif w<=51.0:print("fly")
  elif w<=54.0:print("bantam")
  elif w<=57.0:print("feather")
  elif w<=60.0:print("light")
  elif w<=64.0:print("light welter")
  elif w<=69.0:print("welter")
  elif w<=75.0:print("light middle")
  elif w<=81.0:print("middle")
  elif w<=91.0:print("light heavy")
  else:print("heavy")

Submission status: Accepted

Solution code:
def put_class(n):
  if n <= 48:
    print("light fly")
  elif n <= 51:
    print("fly")
  elif n <= 54:
    print("bantam")
  elif n <= 57:
    print("feather")
  elif n <= 60:
    print("light")
  elif n <= 64:
    print("light welter")
  elif n <= 69:
    print("welter")
  elif n <= 75:
    print("light middle")
  elif n <= 81:
    print("middle")
  elif n <= 91:
    print("light heavy")
  else:
    print("heavy")
 
while True:
  try:
    put_class(float(input()))
  except EOFError:
    break

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for atcorder program
###

import sys
import math

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

    ### Prime Number
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    ### Mat Multiplication
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans

mymath = mymath()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        #print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]

#R = float(input())
#A.append(list(map(int,input().split())))

#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

#abc list
#abc = [chr(ord('a') + i) for i in range(26)]

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

def get_input():
    N = []
    while True:
        try:
            #N.append(input())
            #N.append(int(input()))
            N.append(float(input()))
        except EOFError:
            break
    return N

N = get_input()

for i in N:
    if i <= 48.00 :
        print("light fly")
    elif 48.00 < i <= 51.00:
        print("fly")
    elif 51.00 < i <= 54.00:
        print("bantam")
    elif 54.00 < i <= 57.00:
        print("feather")
    elif 57.00 < i <= 60.00:
        print("light")
    elif 60.00 < i <= 64.00:
        print("light welter")
    elif 64.00 < i <= 69.00:
        print("welter")
    elif 69.00 < i <= 75.00:
        print("light middle")
    elif 75.00 < i <= 81.00:
        print("middle")
    elif 81.00 < i <= 91.00:
        print("light heavy")
    elif 91.00 < i :
        print("heavy")