-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDesigner PDF Viewer
More file actions
36 lines (23 loc) · 809 Bytes
/
Designer PDF Viewer
File metadata and controls
36 lines (23 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the designerPdfViewer function below.
def designerPdfViewer(h, word):
list1=[]
n=len(word)
d={'a':h[0],'b':h[1],'c':h[2],'d':h[3],'e':h[4],'f':h[5],'g':h[6],'h':h[7],'i':h[8],'j':h[9],'k':h[10],'l':h[11],'m':h[12],'n':h[13],'o':h[14],'p':h[15],'q':h[16],'r':h[17],'s':h[18],'t':h[19],'u':h[20],'v':h[21],'w':h[22],'x':h[23],'y':h[24],'z':h[25]}
#print(d[word[0]])
for i in range(0,len(word)):
list1.append(d[word[i]])
c=max(list1)
return c*n
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
h = list(map(int, input().rstrip().split()))
word = input()
result = designerPdfViewer(h, word)
fptr.write(str(result) + '\n')
fptr.close()