Editorial for YAD786

PROBLEM LINK:

Practice

Author: Setter’s name
Tester: Tester’s name
Editorialist: Abhishek Yadav

DIFFICULTY:

EASY

PREREQUISITES:

String and Array

PROBLEM:

Finding the ascii Value of strings

QUICK EXPLANATION:

ADD the ascii value of the given strings and compare them if the difference between ascii value of 1st string and 2nd string is between 1 and 10 the winner is rashmi else the winner is mohit.

EXPLANATION:

ADD the ascii value of the given strings and compare them if the difference between ascii value of 1st string and 2nd string is between 1 and 10 the winner is rashmi else the winner is mohit.
just calculate the ascii value of both the strings and find the difference between them if the difference is between 1 and 10 (inclusive) the winner is rashmi and if the difference is more than 10 or less than 1 (inclusive) the winner is mohit.
you have to substract the 2nd string from 1st not the 1st from 2nd.

SOLUTIONS:

1
rashi
mohit

the winner is Rashmi because the difference between the ascii values of the string is 10
so the winner is rashmi.