Editorial for Spring Coding Bowl '22 P1 - Student Numbers
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Take in the student number as an array of integers. For example, 123456
. Replace every with a , . Finally, check if every adjacent digit in the new array has an absolute difference equal to and print accordingly. Note that other solutions exist.
Time Complexity:
Comments