Problem:


お財布メタボ診断

４月に消費税が８％になってから、お財布が硬貨でパンパンになっていませんか。同じ金額を持ち歩くなら硬貨の枚数を少なくしたいですよね。硬貨の合計が１０００円以上なら、硬貨をお札に両替して、お財布のメタボ状態を解消できます。

お財布の中の硬貨の枚数が種類ごとに与えられたとき、硬貨をお札に両替できるかどうかを判定するプログラムを作成してください。

入力

入力は以下の形式で与えられる。

c1 c5 c10 c50 c100 c500

入力は１行からなる。c1、c5、c10、c50、c100、c500 (0 ≤ c1, c5, c10, c50, c100, c500 ≤ 50) は、それぞれ、1円、5円、10円、50円、100円、500円硬貨の枚数を表す。

出力

硬貨をお札に両替できるなら1 を、そうでなければ 0 を１行に出力する。

入出力例

入力例１

3 1 4 0 4 1 

 出力例１

0

入力例２

2 1 4 3 2 3

 出力例２

1

入力例３ 

21 5 9 3 1 1 

出力例３

0

入力例４

2 4 3 3 3 1 

 出力例４

1

入力例５

50 50 50 4 0 0 

 出力例５

1



Sample input:
3 1 4 0 4 1


Sample output:
0

Submission status: Wrong Answer

Solution code:
c = list(map(int, input().split()))
a = [1,5,10,50,100,500]
print(sum([x * y for (x, y) in zip(c, a)]))

Submission status: Wrong Answer

Solution code:
coins = [1, 5, 10, 50, 100 ,500]

if __name__ == "__main__":
    wallet = list(map(int, input().split()))
    sum = 0
    for i in range(6):
        sum += (coins[i] * wallet[i])

    print(1 if sum > 1000 else 0)

Submission status: Wrong Answer

Solution code:
c1,c5,c10,c50,c100,c500=map(int,input().split())
if c1+c5+c10+c50+c100+c500>1000:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
c1,c5,c10,c50,c100,c500=map(int,input().split())
if (c1*1)+(c5*5)+(c10*10)+(c50*50)+(c100*100)+(c500*500)>1000:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
a,b,g,c,d,e=map(int,input().split())
f,ans=a*1+b*5+g*10+c*50+d*100+e*500,0
while True:
    if f>=1000:
        f,ans=f-1000,ans+1
    else:break
print(ans)

Submission status: Accepted

Solution code:
c = list(map(int, input().split()))
key = c[0]+5*c[1]+10*c[2]+50*c[3]+100*c[4]+500*c[5]
if key >= 1000:
    print(1)
    quit()
print(0)

Submission status: Accepted

Solution code:
c = list(map(int, input().split()))
a = [1,5,10,50,100,500]
print(1 if sum([x * y for (x, y) in zip(c, a)]) >= 1000 else 0)

Submission status: Accepted

Solution code:
import sys

coef = [1,5,10,50,100,500]
s = raw_input()
arr = s.split(' ')
sum = 0
for i in range(0,6):
    sum = sum + int(arr[i]) * coef[i];
if sum >= 1000:
    print 1
else:
    print 0

Submission status: Accepted

Solution code:
print int(sum(map(lambda x,y:x*y, map(int,raw_input().split()),[1,5,10,50,100,500])) >= 1000)

Submission status: Accepted

Solution code:
import sys
from operator import mul
f = sys.stdin

#from io import StringIO
#f = StringIO('''3 1 4 0 4 1''')

coins = map(int, f.readline().split())
coin_values = (1, 5, 10, 50, 100, 500)
paper = 1000

is_exchangeable = paper <= sum(map(mul, coins, coin_values))

print(1 if is_exchangeable else 0)

Submission status: Accepted

Solution code:
print(1 if sum([v * (5 if i % 2 else 1) * 10**(i // 2) for i, v in enumerate(list(map(int, input().split())))]) >= 1000 else 0)

Submission status: Accepted

Solution code:
m = map(int, raw_input().split())
sum = 0
sum += m[0]+m[1]*5+m[2]*10+m[3]*50+m[4]*100+m[5]*500
if sum >= 1000: print "1"
else: print"0"

Submission status: Accepted

Solution code:
a,b,c,d,e,f = map(int, input().split())
sum = a+b*5+c*10+d*50+e*100+f*500
print(1 if sum >= 1000 else 0)

Submission status: Accepted

Solution code:
c = map(int, raw_input().split())
money = c[0]*1 + c[1]*5 + c[2]*10 + c[3]*50 + c[4]*100 +c[5]*500
print "1" if money >= 1000 else "0"

Submission status: Accepted

Solution code:
s = map(int, raw_input().split())
print(s[0]+5*s[1]+10*s[2]+50*s[3]+100*s[4]+500*s[5]>999)/1

Submission status: Accepted

Solution code:
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0295

x = input()
c1 = int(x.split(" ")[0])
c5 = int(x.split(" ")[1])
c10 = int(x.split(" ")[2])
c50 = int(x.split(" ")[3])
c100 = int(x.split(" ")[4])
c500 = int(x.split(" ")[5])
if (c1 + 5 * c5 + 10 * c10 + 50 * c50 + 100 * c100 + 500 * c500) < 1000:
	print("0")
else:
	print("1")

Submission status: Accepted

Solution code:
c1,c5,c10,c50,c100,c500 = map(int, raw_input().split())
money = 1 * c1 + 5 * c5 + 10 * c10 + 50 * c50 + 100 * c100 + 500 * c500
if money>=1000: print "1"
else: print "0"

Submission status: Accepted

Solution code:
coins = [1, 5, 10, 50, 100 ,500]

if __name__ == "__main__":
    wallet = list(map(int, input().split()))
    sum = 0
    for i in range(6):
        sum += (coins[i] * wallet[i])

    print(1 if sum >= 1000 else 0)

Submission status: Accepted

Solution code:
a,b,c,d,e,f=map(int,input().split())
print(1 if a+b*5+c*10+d*50+e*100+f*500>=1000 else 0)

Submission status: Accepted

Solution code:
a,b,c,d,e,f=map(int,input().split())
print(int(a+b*5+c*10+d*50+e*100+f*500>=1000))

Submission status: Accepted

Solution code:
print(1 if sum([x*y for x,y in zip(list(map(int, input().split())),[1,5,10,50,100,500])])>=1000 else 0)

Submission status: Accepted

Solution code:
c1,c5,c10,c50,c100,c500=map(int,input().split())
if (c1*1)+(c5*5)+(c10*10)+(c50*50)+(c100*100)+(c500*500)>=1000:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
c1, c5, c10, c50, c100, c500 = map(int, input().split())
if c1*1+ c5*5+ c10*10+ c50*50+ c100*100+ c500*500 >= 1000:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
# Aizu Problem 0296: A Fat Wallet

import sys, math, os

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

c1, c5, c10, c50, c100, c500 = [int(_) for _ in input().split()]
S = c1 + 5 * c5 + 10 * c10 + 50 * c50 + 100 * c100 + 500 * c500
print(1 if S >= 1000 else 0)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0296

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    ans = 0
    c1, c5, c10, c50, c100, c500 = map(int, input().split())
    if c1 + c5*5 + c10*10 + c50*50 + c100*100 + c500*500 >= 1000:
        ans = 1
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
coins = list(map(int, input().split()))
for i in range(len(coins)):
    current_coin = coins[i]
    if i == 0:
        coins[i] = current_coin * 1
    elif i == 1:
        coins[i] = current_coin * 5
    elif i == 2:
        coins[i] = current_coin * 10
    elif i == 3:
        coins[i] = current_coin * 50
    elif i == 4:
        coins[i] = current_coin * 100
    elif i == 5:
        coins[i] = current_coin * 500

if sum(coins) >= 1000:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
a,b,g,c,d,e=map(int,input().split())
f,ans=a*1+b*5+g*10+c*50+d*100+e*500,0
if f>=1000:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
a,b,c,d,e,f = map(int, input().split())
print(1 if a+5*b+10*c+50*d+100*e+500*f>=1000 else 0)

Submission status: Accepted

Solution code:
# AOJ 0296: A Fat Wallet
# Python3 2018.6.23 bal4u

a = (1, 5, 10, 50, 100, 500)
c = list(map(int, input().split()))
s = 0
for i in range(6): s += a[i]*c[i]
print(1 if s >= 1000 else 0)

Submission status: Accepted

Solution code:
print(1 if sum((i * j for i , j in zip((1, 5, 10, 50, 100, 500), map(int, input().split())))) >= 1000 else 0)

Submission status: Accepted

Solution code:
c1, c5, c10, c50, c100, c500 = map(int, input().split())
s = c1+5*c5+10*c10+50*c50+100*c100+500*c500
if s>= 1000:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
lst = list(map(int, input().split()))
if lst[0] + lst[1]*5 + lst[2]*10 + lst[3]*50 + lst[4]*100 + lst[5]*500 >= 1000 :
    print(1)
else :
    print(0)

Submission status: Accepted

Solution code:
a,b,c,d,e,f= map(int,input().split())

if (a + 5*b + 10*c + 50*d + 100*e + 500*f) // 1000>= 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
num = list(map(int,input().split())) #標準入力
if num[0] + num[1] * 5 + num[2] * 10 + num[3] * 50 + num[4] * 100 + num[5] * 500 >= 1000:print("1") #合計が１０００円以上なら"1"を出力する
else:print("0") #1000以下なら"0"を出力する

Submission status: Accepted

Solution code:
a,b,c,d,e,f=map(int,input().split())
if a+5*b+10*c+50*d+100*e+500*f>=1000:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
a,b,c,d,e,f=map(int,input().split())
if(a+b*5+c*10+d*50+e*100+f*500 >= 1000):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
if a[0]+a[1]*5+a[2]*10+a[3]*50+a[4]*100+a[5]*500 >= 1000:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
C = list(map(int, input().split()))

s = C[0] + C[1] * 5 + C[2] * 10 + C[3] * 50 + C[4] * 100 + C[5] * 500

if(s >= 1000) :
    print(1)
else :
    print(0)

Submission status: Accepted

Solution code:
c=list(map(int,input().split()))
a=[1,5,10,50,100,500]
s=sum(a[i]*c[i] for i in range(6))
print(1 if s>=1000 else 0)

Submission status: Accepted

Solution code:
a = (1, 5, 10, 50, 100, 500)
c = list(map(int, input().split()))
s = 0
for i in range(6): s += a[i]*c[i]
print(1 if s >= 1000 else 0)

Submission status: Accepted

Solution code:
c1, c5, c10, c50, c100, c500 = map(int, input().split())
sum = c1 + c5*5 + c10*10 + c50*50 + c100*100 + c500*500
print(1 if sum >= 1000 else 0)

Submission status: Accepted

Solution code:
a,b,c,d,e,f=map(int,input().split())
S=a*1+b*5+c*10+d*50+e*100+f*500
if S/1000 >=1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
c1,c5,c10,c50,c100,c500=map(int,input().split())

sum = c1+c5*5+c10*10+c50*50+c100*100+c500*500

if sum < 1000:
    print("0")
else:
    print("1")

Submission status: Accepted

Solution code:
a,b,c,d,e,f = map(int,input().split(" "))
if a*1+b*5+c*10+d*50+e*100+f*500 < 1000:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
c1, c5, c10, c50, c100, c500 = map(int,input().split())
sum = c1 + 5*c5 + 10*c10 + 50*c50 + 100*c100 + 500*c500
if sum >= 1000:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
c1,c5,c10,c50,c100,c500=map(int,input().split())
sum=c1+c5*5+c10*10+c50*50+c100*100+c500*500
if 0<sum//1000:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
c1, c5, c10, c50, c100, c500 = map(int, input().split())
sum = c1 + c5*5 + c10*10 + c50*50 + c100*100 + c500*500
if sum >= 1000: print("1")
else: print("0")

Submission status: Accepted

Solution code:
a,b,c,d,e,f=map(int,input().split())
if a+b*5+c*10+d*50+e*100+f*500>=1000:
  print("1")
else:
  print("0")

Submission status: Accepted

Solution code:
c1,c2,c3,c4,c5,c6=map(int,input().split())
if c1+c2*5+c3*10+c4*50+c5*100+c6*500>=1000:
    print("1")
else:
    print("0")

Submission status: Accepted

Solution code:
c = list(map(int, input().split()))
s = (1, 5, 10, 50, 100, 500)
t = 0
for i in range(6):
  t += c[i] * s[i]
print(1 if t>=1000 else 0)

Submission status: Accepted

Solution code:
c1, c5, c10, c50, c100, c500 = map(int, input().split())

money = c1 + c5*5 + c10*10 + c50*50 + c100*100 + c500*500
if money >= 1000:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
coins = list(map(int, input().split()))
for i in range(len(coins)):
    current_coin = coins[i]
    if i == 0:
        coins[i] = current_coin * 1
    elif i == 1:
        coins[i] = current_coin * 5
    elif i == 2:
        coins[i] = current_coin * 10
    elif i == 3:
        coins[i] = current_coin * 50
    elif i == 4:
        coins[i] = current_coin * 100
    elif i == 5:
        coins[i] = current_coin * 500
 
if sum(coins) >= 1000:
    print('1')
else:
    print('0')

Submission status: Runtime Error

Solution code:
values = [1, 5, 10, 50, 100, 500]
coins = map(int, raw_input().split())

total = sum(map(lambda a,b: a * b, zip(value, coins)))

print total>999?1:0