Submit solution

Points:
7 (partial)

Time limit:
1.0s

Memory limit:
256M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Hypnova is a love guru. He has a mathematical way to determine the compatibility of two people. His method is as follows:

- Take the names of the two people and perform the following process:
- Take the value of each letter (a = 1, b = 2, c = 3, etc.) and put it to the power of its position in the name (starting from 1).
- Sum these values together and mod the number by into the range

- Add these two values together to get the compatibility out of 20.

Hypnova needs you to make a program that calculates two people's compatibility based on the criterion described above. The program should not be case sensitive.

#### Input Specification

Given names and , find their compatibility out of 20. The names are guaranteed to consist of only latin letters and letters in length.

##### Subtask 1 [10%]

##### Subtask 2 [20%]

##### Subtask 3 [70%]

#### Output Specification

A number in the range .

#### Sample Input

```
Romeo
Juliet
```

#### Sample Output

`15`

#### Explanation for Sample Output

Romeo:

Juliet:

Compatibility:

## Comments

Hypnova sensei, I'm lonely can you set me up? pls <3 <3

This comment is hidden due to too much negative feedback. Click here to view it.

Wrong Ryan!

So it's Ryan Jiang?

Me too

Isn't 10 mod 10 0?

Yes, but the problem statement says:

If both names have a compatibility of 1, the minimum output should be 2.

Right. Problem statement updated.