#!/usr/bin/pyhton3
import random
import math

def gen_list(n):
	return [round(random.uniform(10,100),2) for _ in range(n)]

def get_count(ml,total):
	count=0
	msum=0
	for el in ml:
		msum+=el
		count+=1
		if msum>=total:
			break
	return count

def print_list(ml):
	print (ml, sep=",")

def main():
	global n,total
	try:
		n=int(input("Give n:"))
		total=float(input("Give total:"))
	except Exception as e:
		print (str(e))
		exit(1)
	ml=gen_list(n)
	print (f"Count={get_count(ml,total)}")
	print_list(ml)

if __name__=="__main__":
	main()
