You are not logged in. Please login at www.codechef.com to post your questions!

×

codevita contest by tcs

Codu And Sum Love Problem Description ```

Scanner sc = new Scanner(System.in);

long sum = 0;

int N = sc.nextInt();

for (int i = 0; i < N; i++) {

final long x = sc.nextLong(); // read input

String str = Long.toString((long) Math.pow(1 << 1, x));

str = str.length() > 2 ? str.substring(str.length() - 2) : str;

sum += Integer.parseInt(str);

}

System.out.println(sum%100);

```

Given N number of x’'s, perform logic equivalent of the above Java code and print the output

Constraints 1<=N<=10^7 0<=x<=10^18

Input Format First line contains an integer N

Second line will contain N numbers delimited by space

Output Number that is the output of the given code by taking inputs as specified above

Explanation Example 1

Input 4 8 6 7 4 Output 64

Example 2

Input

3

1 2 3

Output

14

asked 10 Aug '18, 12:11

anshulthakur12's gravatar image

0★anshulthakur12
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,302
×158
×158

question asked: 10 Aug '18, 12:11

question was seen: 510 times

last updated: 10 Aug '18, 12:11