-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDesigner_PDF_viewer.java
More file actions
35 lines (31 loc) · 888 Bytes
/
Designer_PDF_viewer.java
File metadata and controls
35 lines (31 loc) · 888 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
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[] h = new int[26];
for(int h_i=0; h_i < 26; h_i++){
h[h_i] = in.nextInt();
}
String word = in.next();
int strl=word.length();
int c[]=new int[strl];
// System.out.println(strl);
for(int i=0;i<strl;i++)
{
c[i]=h[Character.getNumericValue(word.charAt(i))-10];
// System.out.println(c[i]);
}
int max=c[0];
for(int i=0;i<strl;i++)
{
if(max<c[i])
max=c[i];
}
System.out.println(strl*max);
// System.out.println(Character.getNumericValue(word.charAt(0)));
}
}