Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # TỪ ĐIỂN
- def check(a):
- # s=str(a)
- for i in a:
- if not(i.isnumeric()): return False
- return True
- k=int(input())
- if k<0 or k>10:
- print("INVALID INPUT")
- else:
- dic ={}
- for i in range(k):
- a,b=map(str,input().split())
- dic[a]=b
- t=0
- ti=1
- for v in dic.values():
- if check(v)==False: continue
- else:
- t+=int(v)
- ti*=int(v)
- print(t,ti)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement