Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

the little elephants and candies

$
0
0

whats wrong with this code in python 3.1.2....for the problem "the little elephants and candies"?

import sys

t=int(input())

for i in range(t):

n,c=map(int,sys.stdin.readline().split())
a=list(map(int,sys.stdin.readline().split()))
if c>=sum(a):
    print("yes")
else:
    print("no")

Viewing all articles
Browse latest Browse all 39796


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>