Ethan Hunt is ready for a new mission. To deactivate a chemical artifact, he must enter the secret numerical code corresponding to the text on the terminal screen. He only knows that this code is always the same if the displayed text is identical.
Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming usage
hashCode and equals
Mission: Impossible
Report a typo
Sample Input 1:
Hello World!Sample Output 1:
-969099747Write a program in Kotlin
fun secretCode(text: String): Int {
// write your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.