Здравейте!
Задачката Longest String от Loops Coding Tasks в judge ми дава 75/100 точки, мога ли да помоля за съдействие?
Ето условието:
Longest String
You are very hungry, but there is a problem - there is just too much options and you can only eat one thing. Being a clever programmer, you decide to form objective critera and eat the food with the longest name. Also, why count manually in 30 seconds, when you can spend 15 minutes writing a script to do the counting?
Input
- The input consists of at least 2 lines
- The last line is always END
- Each different food is on a new line
Output
- Print the food with the longest name. If two or more foods have equal length, print the last one.
Constraints
1 <= lines of input <= 50 The last line will always be END
Ето и моето решение:
Longest String