Amplitude Hackathon '23 Practice Problem 2 - Go Amplitude!

View as PDF

Submit solution

Points: 5 (partial)
Time limit: 1.0s
Memory limit: 1G

Problem type

At the end of the last All Hands, Spenser says GO AMPLITUDE very emphatically. The Zoom caption transcription bugs out and starts emitting GOAMPLITUDE in an infinite loop.

You are curious what the Nth letter of a string of GOAMPLITUDE repeating infinitely looks like.

Constraints

1N<101000000

Subtask 1 [1 point]

N11

Subtask 2 [1 point]

N103

Subtask 3 [1 point]

N106

Subtask 4 [1 point]

N1018

Subtask 5 [1 point]

No additional constraints.

Input Specification

The first and only line of input contains a single positive integer N.

Output Specification

Output the Nth letter of a string of GOAMPLITUDE repeating infinitely.

Sample Input 1

Copy
11

Sample Output 1

Copy
E

Sample Explanation 1

The first 11 letters are GOAMPLITUDE, so the 11th letter is an E.

Sample Input 2

Copy
12

Sample Output 2

Copy
G

Sample Explanation 2

The first 22 letters are GOAMPLITUDEGOAMPLITUDE. The 12th letter is therefore a G.


Comments

There are no comments at the moment.