submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s835604716 | p00106 | Accepted | a=[2,3,5,10,12,15]
b=[380,550,850,1520,1870,2244]
while 1:
n=int(input())
if n==0:break
n//=100
dp=[0]+[1<<29]*n
for i in range(5,-1,-1):
for j in range(n+1):
if j+a[i]<=n and dp[j]!=1<<29:dp[j+a[i]]=min(dp[j+a[i]],dp[j]+b[i])
print(dp[n]) | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s001556209 | p00106 | Accepted | a=[(2,380),(3,550),(5,850),(10,1520),(12,1870),(15,2244)]
dp=[1<<20]*51
for i,j in a:
dp[i]=j
for k in range(51-i):
if dp[k]!=1<<20 and dp[k+i]>dp[k]+j:
dp[k+i]=dp[k]+j
while 1:
n=int(input())
if n==0:break
print(dp[n//100]) | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s189439732 | p00106 | Accepted | from itertools import combinations_with_replacement
while True:
price = int(input())
if price == 0: break
candidates = []
for i in range(1, 25):
tmp = list(combinations_with_replacement([200, 300, 500], i))
for t in tmp:
if sum(t) == price:
candidates.append(t... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s665341872 | p00106 | Accepted | # -*- coding: utf-8 -*-
import sys
import os
for s in sys.stdin:
n = int(s)
if n == 0:
break
costs = []
for a in range(0, 26):
for b in range(0, 17):
for c in range(0, 11):
# candidate
if a * 200 + b * 300 + c * 500 == n:
... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s072837367 | p00106 | Accepted | Soba = [[2,380],[3,550],[5,850],[10,1520],[12,1870],[15,2244]] #???,??????
while True:
g = int(input())
if g == 0:
break
g_g = int(g / 100)
DP = [[10000 for j in range(g_g + 1)] for i in range(7)]
for i in range(7):
DP[i][0] = 0
for i in range(7):
for j in range(g_g + 1):... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s822597744 | p00106 | Accepted | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0106&lang=jp
"""
import sys
def solve(amount):
"""
:param amount: ?????\???????????°?????????
:return: ?????????
"""
best_price = (amount + 199) // 200 * 380
for a in range(amount // 200 + 1):
for b in... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s769405427 | p00106 | Accepted | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0106&lang=jp
"""
import sys
def solve(amount):
"""
:param amount: ?????\???????????°?????????
:return: ?????????
"""
best_price = (amount + 199) // 200 * 380
for a in range(amount // 200 + 1):
for b in... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s447083665 | p00106 | Accepted | h={15:2244,12:1870,10:1520,5:850,3:550,2:380}
m={0:0}
for i in range(50):
if i in m:
for k,v in h.items():
m[i+k] = min(m.get(i+k,1e9),m[i]+v)
while True:
n = input()
if n == 0 : break
print(m[n/100]) | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s841010517 | p00106 | Accepted | import sys
#from me.io import dup_file_stdin
def price(pack,unit_price,units,off):
return pack//units*units*unit_price*(1.-off) + pack%units*unit_price
#@dup_file_stdin
def solve():
while True:
w = int(sys.stdin.readline())
if w == 0 :return
min = max([380*25,550*17,850*10])
fo... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s743051847 | p00106 | Accepted | while True:
N = int(input())
if N==0: break
ans = float('inf')
for c200 in range(N//200+1):
for c300 in range(N//300+1):
for c500 in range(N//500+1):
if 200 * c200 + c300 * 300 + c500 * 500 == N:
ans = min(ans, 1520*(c200//5)+380*(c200%5)+1870*(c300//4)+550*(c300%4)+2244*(c500//3)+850*(c500%3))
print... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s678066602 | p00106 | Accepted | a=[1e4]*51
for i,j in[(2,380),(3,550),(5,850),(10,1520),(12,1870),(15,2244)]:
a[i]=j
for k in range(51-i):
if a[k+i]>a[k]+j:a[k+i]=a[k]+j
for n in iter(input,'0'):print(a[int(n)//100])
| 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s651128681 | p00106 | Accepted | a=[1e4]*51
for i,j in[(2,380),(3,550),(5,850),(10,1520),(12,1870),(15,2244)]:
a[i]=j
for k in range(51-i):a[k+i]=min(a[k]+j,a[k+i])
for n in iter(input,'0'):print(a[int(n)//100])
| 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s057422520 | p00106 | Accepted | a=[1e4]*51
for i,j in[(2,380),(3,550),(5,850),(10,1520),(12,1870),(15,2244)]:
a[i]=j
for k in range(51-i):a[k+i]=min(a[k+i],a[k]+j)
for n in iter(input,'0'):print(a[int(n)//100])
| 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s838093843 | p00106 | Accepted | def calc(A, B, C):
da = A // 5
na = A % 5
db = B // 4
nb = B % 4
dc = C // 3
nc = C % 3
return da*1520 + na*380 + db*1870 + nb*550 + dc*2244 + nc*850
def f(a, b, c, g):
if g == 0:
return calc(a, b, c)
if g < 0:
return 10000000
return min(f(a+1, b, c, g-2), f(a, ... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s763130055 | p00106 | Accepted | INF = 10 ** 20
def solve(n):
ans = INF
for i in range(n // 500 + 1):
for j in range((n - 500 * i) // 300 + 1):
if not (n - 500 * i - 300 * j) % 200:
a = (n - 500 * i - 300 * j) // 200
va = a // 5 * 1900 * 0.8 + a % 5 * 380
vb = j // 4 * 2200 * 0.85 + j % 4 * 550
vc = i //... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s531745033 | p00106 | Accepted | # AOJ 0106 Discounts of Buckwheat
# Python3 2018.6.18 bal4u
a = [ 2, 3, 5 ]
s = [ 380, 550, 850 ]
c = [ 10, 12, 15 ]
f = [ 1520, 1870, 2244 ]
tbl = [0]*60
def rec(i, v, cost):
if i == 3:
if (v <= 50 and tbl[v] == 0) or tbl[v] > cost: tbl[v] = cost
return
for j in range(0, 51-v, a[i]):
cc = j // c[i] * f[i] +... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s608857772 | p00106 | Accepted | def ceil(n, m):
return n / m + 2 if n % m != 0 else n / m + 1
def gram(l):
return 200 * l[0] + 300 * l[1] + 500 * l[2]
def price(l):
def c(n, m, p, r):
d = (n / m) * m
return ((n - d) + d * r) * p
return int(c(l[0], 5, 380, 0.80) + c(l[1], 4, 550, 0.85) + c(l[2], 3, 850, 0.88))
t = []
for amount in ... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s224157445 | p00106 | Accepted | def price(num_unit, shop):
A, B, C = 0, 1, 2
if shop == A:
num_discount = (num_unit / 5) * 5
return 380 * num_discount * 0.8 + 380 * (num_unit % 5)
elif shop == B:
num_discount = (num_unit / 4) * 4
return 550 * num_discount * 0.85 + 550 * (num_unit % 4)
else:
... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s213161551 | p00106 | Accepted | w=[200,300,500,1000,1200,1500]
p=[380,550,850,1520,1870,2244]
dp=[2<<20]*5001
dp[0]=0
for i in xrange(6):
for j in xrange(0,5000-w[i]+1,100):
dp[j+w[i]] = min(dp[j+w[i]] , dp[j]+p[i])
while True:
n=input()
if n==0:
break
print dp[n] | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s541939206 | p00106 | Accepted | while 1:
w = int(raw_input())
if w == 0: break
minp = 9500
for c in range(11):
for b in range(17):
for a in range(26):
t = 200 * a + 300 * b + 500 * c
if t > w: break
if t == w:
p = int(380 * (a - a % 5) * 0.8 + 380 ... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s116600189 | p00106 | Accepted |
import sys
class Item:
def __init__(self, amount, price):
self.amount = amount
self.price = price
items = [ Item(200, 380), # 380
Item(300, 550), # 550
Item(500, 850), # 850
Item(200 * 5, 380 * 5 * 0.8), ... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s448779663 | p00106 | Accepted | #!/usr/bin/env python
from __future__ import division, print_function
from sys import stdin, exit
def main(readline=stdin.readline):
price_table = (
0, 0, 380, 550, 760, 850, 1100, 1230, 1400, 1610, 1520, 1950,
1870, 2070, 2250, 2244, 2620, 2624, 2794, 3004, 3040, 3344,
3390, 3590, 3740, 3... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s732347284 | p00106 | Accepted | r = 51
wc = [[15,2244],[10,1520],[12,1870],[5,850],[3,550],[2,380]]
dp = [0]*r
for w,c in wc:
dp[w] = c
for i in range(r - w):
if dp[i] > 0 and (dp[i + w] == 0 or dp[i + w] > dp[i] + c):
dp[i + w] = dp[i] + c
while 1:
n = input()
if n == 0: break
print dp[n/100] | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s651241299 | p00106 | Accepted | r,x = 51,2**31
wc = [[15,2244],[10,1520],[12,1870],[5,850],[3,550],[2,380]]
dp = [x]*r
for w,c in wc:
dp[w] = c
for i in range(r - w):
if dp[i] < x and dp[i + w] > dp[i] + c:
dp[i + w] = dp[i] + c
while 1:
n = input()
if n == 0: break
print dp[n/100] | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s599144401 | p00106 | Accepted | """
A店:200g,380y,20%/5 → 1.9y/g
B店:300g,550y,15%/4 → 1.83y/g
C店:500g,850y,12%/3 → 1.7y/g
380*5 *0.8 = 1520 304/1つ
550*4 *0.85 = 1870 467.5/1つ
850*3 *0.88 = 2244 748/1つ
"""
# 購入数は50g刻みと明言されているので
P = [2,10, 3,12, 5,15]
Q = [380,1520, 550,1870, 850,2244]
MAX = 50
Range = [0] + [1000000]*MAX
for p,q in zip(P,Q):
... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s593194101 | p00106 | Accepted | P = [2, 10, 3, 12, 5, 15]
Q = [380, 1520, 550, 1870, 850, 2244]
MAX = 50
Range = [0] + [1000000] * MAX
for p, q in zip(P, Q):
for i in range(MAX - p + 1):
Range[i + p] = min(Range[i + p],Range[i] + q)
while 1:
v = int(input())
if v == 0:
break
print(Range[v // 100])
| 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s814782651 | p00106 | Accepted | P = [2, 10, 3, 12, 5, 15]
Q = [380, 1520, 550, 1870, 850, 2244]
L = 50
R = [0] + [1e9]*L
for p, q in zip(P, Q):
for i in range(L-p+1):
R[i+p] = min(R[i+p], R[i] + q)
while 1:
v = int(input())
if v == 0:
break
print(R[v//100])
| 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s616079281 | p00106 | Accepted | import heapq
from collections import deque
from enum import Enum
import sys
import math
from _heapq import heappush, heappop
import copy
from test.support import _MemoryWatchdog
BIG_NUM = 2000000000
HUGE_NUM = 99999999999999999
MOD = 1000000007
EPS = 0.000000001
sys.setrecursionlimit(100000)
while True:
N = int... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s316656973 | p00106 | Accepted | # coding=utf-8
###
### for python 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... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s928833239 | p00106 | Accepted | while 1:
try:
inp=int(input())
if inp==0:break
m_list=[]
for i in range(4):
for j in range(5):
for k in range(6):
for l in range(3):
for m in range(4):
for n in range(5):
... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s549823407 | p00106 | Accepted | while True:
g = int(input())//100
if g == 0:
break
p = 100000
for a in range(g//2 + 1):
for b in range(g//3 + 1):
for c in range(g//5 + 1):
if a*2 + b*3 + c*5 == g:
p = min(p, 1520*(a//5) + 380*(a%5) + 1870*(b//4) + 550*(b%4) + 2244*(c//3) ... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s592296991 | p00106 | Accepted | INF = 10**20
def solve(n):
inf = INF
for i in range((n//500) + 1):
for j in range(((n - 500*i)//300) + 1):
if ((n - 500*i - 300*j)%200 == 0):
a = (n - 500*i - 300*j)//200
va = (a//5)*380*5*0.8 + (a%5)*380
vj = (j//4)*550*4*0.85 + (j%4)*550
... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s259699885 | p00106 | Accepted | p1,p2,p3 = 380,550,850
q1,q2,q3 = 200,300,500
d1,d2,d3 = 5,4,3
r1,r2,r3 = 0.2,0.15,0.12
arr = []
for tot in range(500,5001,100):
lst = 1000000000
for i in range(0,int(tot/q1)+1):
for j in range(0,int(tot/q2)+1):
for k in range(0,int(tot/q3)+1):
if i*q1+j*q2+k*q3 == tot:
... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s942442799 | p00106 | Runtime Error | def solve2(amount):
"""
???????¨???????????????¨?????????????????§???
"""
packages = [(0, 0), (2, 380), (3, 550), (5, 850), (10, 1520), (12, 1870), (15, 2244)] # 1?¢??????????(100g??????)??¨??????????????¢l
# dp??¨???2?¬??????????????¨?????????????(100g??????)?????????????????¨??§??????packages????¨... | 500
2200
0
| 850
3390
|
<H1>Discounts of Buckwheat</H1>
<p>
Aizu is famous for its buckwheat. There are many people who make buckwheat noodles by themselves.
</p>
<p>
One day, you went shopping to buy buckwheat flour. You can visit three shops, A, B and C. The amount in a bag and its unit price for each shop is determined by the follows ... |
s743970271 | p00107 | Wrong Answer | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Created : 2015-05-12
l = map(int, input().split())
m = min(l)
for _ in range(int(input())):
if int(input()) >= m:
print("OK")
else:
print("NA") | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s104415834 | p00107 | Wrong Answer | while True:
solid = sorted(map(int, raw_input().split()))
print solid
if solid.count(0) == 3: break
n = input()
r = []
s = (solid[0]**2+solid[1]**2)/4
for i in range(n):
r.append(input())
if r[i]*r[i] > s:
print 'OK'
else:
print 'NA' | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s282339671 | p00107 | Wrong Answer | while True:
solid = sorted(map(int, raw_input().split()))
print solid
if solid.count(0) == 3: break
n = input()
s = (solid[0]**2+solid[1]**2)/4
for i in range(n):
r = input()
if r*r > s:
print 'OK'
else:
print 'NA'
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s174787037 | p00107 | Wrong Answer | A, B, C = map(int, raw_input().split())
n = input()
r = min([((A**2)+(B**2))**0.5, ((A**2)+(C**2))**0.5, ((B**2)+(C**2))**0.5])
for i in range(n):
if (input()*2 > r): print "OK"
else: print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s023080982 | p00107 | Wrong Answer | import math
def doc_string():
"""
I can fly.
"""
while True:
tz = map(int,raw_input().split())
if tz[0] == 0 and tz[1] == 0 and tz[2] == 0:
break
sorted(tz)
til = math.hypot(tz[0], tz[1]) / 2
for i in xrange(int(raw_input())):
gate = int(raw_input())
if gate > til:
print "OK"
else:
print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s249908961 | p00107 | Wrong Answer | a = list(map(int,raw_input().split()))
x = sorted(a)[0]
y = sorted(a)[1]
R = (x * 0.5) ** 2 + (y * 0.5) ** 2
n = input()
for i in range(n):
if (int(raw_input())) ** 2 > R:
print 'OK'
else:
print 'NA'
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s680239719 | p00107 | Wrong Answer | x,y,z=map(int,raw_input().split())
tmp=min([x**2+y**2,x**2+z**2,y**2+z**2])
n=int(raw_input())
for i in range(n):
r=int(raw_input())
print 'OK' if (r*2)**2>tmp else 'NA' | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s101555756 | p00107 | Wrong Answer | x,y,z=map(int,raw_input().split())
tmp=min([x**2+y**2,x**2+z**2,y**2+z**2])
n=int(raw_input())
for i in range(n):
r=int(raw_input())
print 'OK' if (r**2)*2>tmp else 'NA' | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s649595642 | p00107 | Wrong Answer | x,y,z=map(int,raw_input().split())
tmp=min([x**2+y**2,x**2+z**2,y**2+z**2])
n=int(raw_input())
for i in range(n):
r=int(raw_input())
print 'OK' if (r**2)*4>tmp else 'NA' | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s544024108 | p00107 | Wrong Answer | # -*- coding: utf-8 -*-
"""
"""
import sys
def solve(d, w, h, holes):
result = []
# ???????????\????????£?????¢???1????????????: ????????????r x 2**0.5
for r in holes:
side_max = max(w, h)
if r*2**0.5 >= side_max:
result.append('OK')
else:
result.append('NA'... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s444111644 | p00107 | Wrong Answer | while True:
d, w, h = [int(x) for x in input().split()]
minrad = min(d*d+w*w,w*w+h*h,h*h+d*d)
if minrad == 0:
break
n = int(input())
for i in range(n):
r = int(input())
if 2*r*r > minrad:
print('OK')
else:
print('NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s080353474 | p00107 | Wrong Answer | import math
while True:
d,w,h = map(int,input().split())
if d == 0:
break
n = int(input())
dist = [d**2+w**2, d**2+h**2, w**2+h**2]
leng = min(dist)
for i in range(n):
if leng-int(input()) > 0:
print('OK')
else:
print('NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s974245381 | p00107 | Wrong Answer | import math
while True:
d,w,h = map(int,input().split())
if d == 0:
break
n = int(input())
dist = [d**2+w**2, d**2+h**2, w**2+h**2]
leng = min(dist)
for i in range(n):
if int(input())-leng > 0:
print('OK')
else:
print('NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s121318302 | p00107 | Wrong Answer | import math
while True:
d,w,h = map(int,input().split())
if d == 0:
break
n = int(input())
dist = [math.sqrt(d**2+w**2), math.sqrt(d**2+h**2), math.sqrt(w**2+h**2)]
leng = min(dist)
for i in range(n):
if int(input())-leng > 0:
print('OK')
else:
print('NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s377545543 | p00107 | Wrong Answer | a,b,_=sorted(list(map(int,input().split())))
for _ in[0]*int(input()):
r=int(input())
print("OK"if r*r*4>a*a+b*b else"NA")
input()
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s558841061 | p00107 | Wrong Answer | import sys
i=iter(sys.stdin)
for k,s in zip(i,i):
if'0'==k:break
s=list(map(int,s.split()))
c=0
while 1:
t=s;s=[t.count(e)for e in t]
if t==s:break
c+=1
print(c);print(*s)
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s428112432 | p00107 | Wrong Answer | import sys
for a in sys.stdin:
if' 'in a:
s=list(map(int,a.split()))
c=0
while 1:
t=s;s=[t.count(e)for e in t]
if t==s:break
c+=1
print(c);print(*s)
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s667220222 | p00107 | Wrong Answer | import sys
for a in sys.stdin:
if'0'in a:break
if' 'in a:
s=list(map(int,a.split()))
c=0
while 1:
t=s;s=[t.count(e)for e in t]
if t==s:break
c+=1
print(c);print(*s)
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s029420152 | p00107 | Wrong Answer | import sys,itertools
def ch(l,r):
t=itertools.combinations(l,2)
for i in t:
if i[0]**2+i[1]**2<4*r**2:
return True
return False
l=list(map(int,input().split()))
o=[ch(l,int(input())) for i in range(int(input()))]
input()
[print("OK") if i else print("NA") for i in o]
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s026298439 | p00107 | Wrong Answer | import itertools
def ch(l,r):
t=itertools.combinations(l,2)
for i in t:
if i[0]**2+i[1]**2<4*r**2:
return True
return False
l=list(map(int,input().split()))
o=[ch(l,int(input())) for i in range(int(input()))]
input()
[print("OK") if i else print("NA") for i in o]
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s424443353 | p00107 | Wrong Answer | import math
results = []
while True:
line = raw_input()
if line == '0 0 0':
for r in results:
print r
break
else:
t = [int(n) for n in line.split()]
t.sort()
size = int(math.ceil(math.sqrt(t[0] * t[0] + t[1] * t[1])))
entry = input()
for i... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s034801143 | p00107 | Wrong Answer | import math
results = []
while True:
line = raw_input()
if line == '0 0 0':
for r in results:
print r
break
else:
t = [int(n) for n in line.split()]
t.sort()
size = math.ceil(math.sqrt(t[0] * t[0] + t[1] * t[1]))
entry = input()
for i in r... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s952616186 | p00107 | Wrong Answer | from math import sqrt
cheeze = map(float,raw_input().split())
cheeze.sort()
supk = sqrt((cheeze[0]/2)**2 + (cheeze[1]/2)**2)
holel = int(raw_input())
for hole in xrange(holel):
k = raw_input()
k = int(k)
if k < supk: print "OK"
else: print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s345055115 | p00107 | Wrong Answer | import sys
from math import sqrt
nyu = sys.stdin.readlines()
cheeze = map(float,nyu[0].split())
cheeze.sort()
supk = sqrt((cheeze[0]/2)**2 + (cheeze[1]/2)**2)
holel = int(nyu[1])
for holei in xrange(holel):
k = int(nyu[2+holei])
if k < supk: print "OK"
else: print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s683591955 | p00107 | Wrong Answer | import sys
from math import sqrt
nyu = sys.stdin.readlines()
#nyu = ["10 8 6",5,5,7,6,4,5]
cheeze = map(float,nyu[0].split())
cheeze.sort()
supk = sqrt((cheeze[0]/2)**2 + (cheeze[1]/2)**2)
holel = int(nyu[1])
for holei in xrange(holel):
k = int(nyu[2+holei])
if k < supk: print "OK"
else: print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s525203096 | p00107 | Wrong Answer | from math import sqrt
cheeze = map(float,raw_input().split())
cheeze.sort()
supk = sqrt((cheeze[0]/2)**2 + (cheeze[1]/2)**2)
holel = int(raw_input())
try:
for holei in xrange(holel):
k = int(raw_input())
if k < supk: print "OK"
else: print "NA"
except:
pass | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s658401667 | p00107 | Wrong Answer | import sys
from math import sqrt
nyu = sys.stdin.read()
nyu = nyu.split("\n")
cheeze = map(float,nyu[0].split())
cheeze.sort()
supk = sqrt((cheeze[0]/2)**2 + (cheeze[1]/2)**2)
nyu = nyu[2:]
for k in nyu:
if k < supk: print "OK"
else: print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s134921232 | p00107 | Wrong Answer | import sys
from math import sqrt
nyu = sys.stdin.read()
nyu = nyu.split("\n")
cheese = map(float,nyu[0].split())
cheese.sort()
supk = sqrt((cheese[0]/2)**2 + (cheese[1]/2)**2)
nyu = nyu[2:]
try:
for k in nyu:
if k < supk: print "OK"
else: print "NA"
except:
pass | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s843435685 | p00107 | Wrong Answer | from sys import stdin
from math import sqrt
cs = map(int,stdin.readline().split())
cs.sort()
c = sqrt(cs[0]**2 + cs[1]**2)/2
n=int(stdin.readline())
for gomi in xrange(n):
r = int(stdin.readline())
if c<r: print "OK"
else: print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s336482446 | p00107 | Accepted | while True:
size = map(int,raw_input().split())
if size[0] == size[1] == size[2] == 0:
break
size = sorted(size)
rmin2 = size[0]**2 + size[1]**2
n = input()
for i in range(n):
R2 = 4 * input()**2
if rmin2 < R2:
print 'OK'
else:
print '... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s616547119 | p00107 | Accepted | while True:
size = map(int,raw_input().split())
if size[0] == 0:
break
size = sorted(size)
rmin2 = size[0]**2 + size[1]**2
n = input()
for i in range(n):
R2 = (input()**2)*4
if rmin2 < R2:
print 'OK'
else:
print 'NA' | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s935888185 | p00107 | Accepted | while 1:
a,b,c=sorted(map(int,raw_input().split()))
if a==b==c==0: break
D=(a*a+b*b)**.5
for _ in [0]*input(): print ["NA","OK"][2*input()>D] | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s802002040 | p00107 | Accepted | while 1:
a,b,c=sorted(map(int,raw_input().split()))
if a==b==c==0: break
D=a*a+b*b
n=input()
for _ in [0]*n:
r=input()
print ["NA","OK"][4*r**2>D] | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s312980396 | p00107 | Accepted | def hantei(A,B,C,R=0):
p,q = sorted([A,B,C])[:2]
if p**2 + q**2 < 4 * R**2:
print 'OK'
else:
print 'NA'
while True:
try:
A,B,C = map(int,raw_input().split())
if (A,B,C) == (0,0,0):
break
except EOFError:
break
for k in range(int(raw_input()))... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s090089480 | p00107 | Accepted | while(1):
size=sorted([int(x) for x in raw_input().split()])
if size[0]==0:
break
else:
cr=size[0]**2+size[1]**2
n=int(raw_input())
for i in range(n):
r=int(raw_input())
if 4*r**2>cr:
print 'OK'
else:
print '... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s282388575 | p00107 | Accepted | while True:
solid = sorted(map(int, raw_input().split()))
if solid.count(0) == 3: break
n = input()
s = (solid[0]**2+solid[1]**2)/4
for i in range(n):
r = input()
if r*r > s:
print 'OK'
else:
print 'NA' | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s543079612 | p00107 | Accepted | while True:
A, B, C = map(int, raw_input().split())
if A == 0: break;
n = input()
r = min([((A**2)+(B**2))**0.5, ((A**2)+(C**2))**0.5, ((B**2)+(C**2))**0.5])
for i in range(n):
if (input()*2 > r): print "OK"
else: print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s431730794 | p00107 | Accepted | import math
def Tom_and_Jerry():
for i in range(int(raw_input())):
r = int(raw_input())
if r > t:
print 'OK'
else:
print 'NA'
while True:
h, w, d = map(int, raw_input().split(' '))
if h == 0: break
a = math.sqrt(h**2 + w**2) / 2.0
b = math.sqrt(... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s054398729 | p00107 | Accepted | import math
def doc_string():
"""
I can fly.
"""
while True:
tz = map(int,raw_input().split())
if tz == [0,0,0]:
break
til = math.hypot(*sorted(tz)[:2]) / 2
for i in xrange(int(raw_input())):
gate = int(raw_input())
if gate > til:
print "OK"
else:
print "NA" | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s184955448 | p00107 | Accepted | while True:
l = [int(i) for i in input().split()]
if l == [0,0,0]:
break
l.sort()
r = (l[0]**2+l[1]**2)**(1/2)/2
n = int(input())
for i in range(n):
r1 = int(input())
if r < r1:
print('OK')
else:
print('NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s429201574 | p00107 | Accepted | def sol():
tmp=min([x**2+y**2,x**2+z**2,y**2+z**2])
n=int(raw_input())
for i in range(n):
r=int(raw_input())
print 'OK' if (r**2)*4>tmp else 'NA'
while 1:
x,y,z=map(int,raw_input().split())
if min(x,y,z)==0:
break
else:
sol() | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s893273569 | p00107 | Accepted | import math
while True:
d, w, h = [int(x) for x in input().split()]
if d == w == h == 0:
break
dw = math.sqrt(d * d + w * w)
dh = math.sqrt(d * d + h * h)
wh = math.sqrt(w * w + h * h)
min_ = min(dw, dh, wh)
n = int(input())
for i in range(n):
r = int(input()) * 2
... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s878189361 | p00107 | Accepted | while True:
try:
d, w, h = list(map(int, input().split()))
if d == w == h == 0:
break
n = int(input())
r = []
for i in range(n):
r = int(input())
if r ** 2 > (d ** 2 + w ** 2) / 4 \
or r ** 2 > (d ** 2 + h ** 2) / 4 \
... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s848399151 | p00107 | Accepted | import math
while True:
l1, l2, l3 = sorted(list(int(i) for i in input().split()))
if l1 == l2 == l3 == 0:
break
n = int(input())
R = math.sqrt(l1 ** 2 + l2 ** 2) / 2
for i in range(n):
r = int(input())
if r > R:
print('OK')
else:
print('NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s752481297 | p00107 | Accepted | while True:
Size_lis = list(map(int,input().split()))
if Size_lis == [0,0,0]:
break
n = int(input())
Size_lis.remove(max(Size_lis))
m_r = (Size_lis[0] / 2) ** 2 + (Size_lis[1] / 2) ** 2
for i in range(n):
r = int(input())
if m_r >= r ** 2:
print("NA")
... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s458942918 | p00107 | Accepted | while 1:
a,b,_=sorted(map(int,input().split()))
if a==0:break
c=(a**2+b**2)**0.5
for _ in range(int(input())):print('OK' if c<int(input())*2 else 'NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s153893558 | p00107 | Accepted | while 1:
a,b,_=sorted(map(int,input().split()))
if a==0:break
c=(a**2+b**2)**0.5//2
for _ in range(int(input())):print('OK' if c<int(input()) else 'NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s399387231 | p00107 | Accepted | def min_diam(A,B,C): # returns a "diameter"
segments=[A,B,C]
segments.sort()
return (segments[0]**2+segments[1]**2)**(1/2)
while True:
# input one dataset
A,B,C = tuple(map(float,input().split()))
if (A,B,C) == (0,0,0):
break
n = int(input())
R = [None]*n
for i in range(n):
R[i] = float(input... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s586248523 | p00107 | Accepted | # -*- coding: utf-8 -*-
import sys
import os
import math
for s in sys.stdin:
d, w, h = map(int, s.split())
if d == w == h == 0:
break
lst = [d, w, h]
lst.sort()
diameter = math.sqrt(lst[0] ** 2 + lst[1] ** 2)
n = int(input())
for i in range(n):
r = int(input())
i... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s615292317 | p00107 | Accepted | # -*- coding: utf-8 -*-
import sys
import os
import math
for s in sys.stdin:
d, w, h = map(int, s.split())
if d == w == h == 0:
break
lst = [d, w, h]
lst.sort()
diameter = math.sqrt(lst[0] ** 2 + lst[1] ** 2)
n = int(input())
for i in range(n):
r = int(input())
... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s403922030 | p00107 | Accepted | while True:
d, w, h = map(int, input().split())
if d == 0:
break
n = int(input())
a, b = sorted([d, w, h])[:2]
t = pow(pow(a, 2) + pow(b, 2), 0.5) // 2
for _ in range(n):
print("OK" if int(input()) > t else "NA") | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s156985210 | p00107 | Accepted | # -*- coding: utf-8 -*-
"""
"""
import sys
def solve(d, w, h, holes):
result = []
diagonal_len = (w**2 + h**2)**0.5
for r in holes:
if r*2 > diagonal_len:
result.append('OK')
else:
result.append('NA')
# ???????????\????????£?????¢???1????????????: ????????????r ... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s625892452 | p00107 | Accepted | # Aizu Problem 0107: Carry a Cheese
#
import sys, math, os
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
while True:
a, b, c = sorted([int(_) for _ in input().split()])
R = .5 * math.sqrt(a**2 + b**2)
if a == b == c == 0:
break
... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s461407448 | p00107 | Accepted | while True:
d, w, h = [int(x) for x in input().split()]
minrad = min(d*d+w*w,w*w+h*h,h*h+d*d)
if minrad == 0:
break
n = int(input())
for i in range(n):
r = int(input())
if 4*r*r > minrad:
print('OK')
else:
print('NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s793509210 | p00107 | Accepted | import math
while True:
d,w,h = map(int,input().split())
if d == 0:
break
n = int(input())
dist = [math.sqrt(d**2+w**2), math.sqrt(d**2+h**2), math.sqrt(w**2+h**2)]
leng = min(dist)
for i in range(n):
if 2*int(input())-leng > 0:
print('OK')
else:
print('NA') | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s534763187 | p00107 | Accepted | import sys
#from me.io import dup_file_stdin
#@dup_file_stdin
def solve():
while True:
l = list(map(int,sys.stdin.readline().split(' ')))
if l[0] == 0: break
l.sort();
n = int(sys.stdin.readline())
for i in range(n):
r = int(sys.stdin.readline())
if r... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s198849908 | p00107 | Accepted | import math
output = []
while True:
depth, width, height = [int(item) for item in input().split(" ")]
if depth == 0 and width == 0 and height == 0:
break
cheeseRadius = math.sqrt((width / 2)**2 + (height / 2)**2)
inputCount = int(input())
for lp in range(inputCount):
entranceRa... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s805917001 | p00107 | Accepted | while 1:
a,b,_=sorted(map(int,input().split()))
if a==0:break
for _ in[0]*int(input()):
r=int(input())
print("OK"if r*r*4>a*a+b*b else"NA")
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s597199468 | p00107 | Accepted | while 1:
a,b,_=sorted(map(int,input().split()))
if a==0:break
for _ in[0]*int(input()):print("OK"if (int(input())*2)**2>a*a+b*b else"NA")
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s016065025 | p00107 | Accepted | while 1:
a,b,_=sorted(map(int,input().split()))
if a==0:break
for _ in[0]*int(input()):print("OK"if(int(input())*2)**2>a*a+b*b else"NA")
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s671539861 | p00107 | Accepted | def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
while True:
d = [int(i) for i in input().split()]
if d[0] == 0 and d[1] == 0 and d[2] == 0:
break
d.sort()
cheese = d[0] * d[0] + d[1] * d[1]
N = int(input())
fo... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s879015264 | p00107 | Accepted | while True:
lst = list(map(int, input().split()))
if not lst[0]:
break
lst.sort()
rad = (lst[0] ** 2 + lst[1] ** 2 ) ** (1 / 2) / 2
n = int(input())
for _ in range(n):
print("OK" if int(input()) > rad else "NA")
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s099859312 | p00107 | Accepted | import itertools
def ch(l,r):
t=itertools.combinations(l,2)
for i in t:
if i[0]**2+i[1]**2<4*r**2:
return True
return False
while 1:
l=list(map(int,input().split()))
if l[0]==0 and l[1]==0 and l[2]==0:break
o=[ch(l,int(input())) for i in range(int(input()))]
[print("OK... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s702890518 | p00107 | Accepted | # AOJ 0107 Carry a Cheese
# Python3 2018.6.17 bal4u
while True:
d, w, h = list(map(int, input().split()))
if d == 0 and w == 0 and h == 0: break
vmin = min(d*d+w*w, d*d+h*h, w*w+h*h)
for _ in range(int(input())):
r = int(input())
print('OK' if (2*r)**2 > vmin else 'NA')
| 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s486418206 | p00107 | Accepted | import math
results = []
while True:
line = raw_input()
if line == '0 0 0':
for r in results:
print r
break
else:
t = [int(n) for n in line.split()]
t.sort()
size = math.sqrt(t[0] * t[0] + t[1] * t[1])
entry = input()
for i in range(entry)... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
s554997551 | p00107 | Accepted | from math import sqrt
while True:
a, b, c = map(int, raw_input().split())
if a == 0 and b == 0 and c == 0:
break
d1, d2, d3 = sqrt(a**2 + b**2), sqrt(b**2 + c**2), sqrt(c**2 + a**2)
for i in range(int(raw_input())):
r = int(raw_input())
if d1 < r * 2 or d2 < r * 2 or d3 < r * ... | 10 6 8
5
4
8
6
2
5
0 0 0
| NA
OK
OK
NA
NA
|
<H1>Carry a Cheese</H1>
<p>
Jerry is a little mouse. He is trying to survive from the cat Tom. Jerry is carrying a parallelepiped-like piece of cheese of size <i>A</i> × <i>B</i> × <i>C</i>. It is necessary to trail this cheese to the Jerry's house. There are several entrances in the Jerry's house. Each... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.