Campbell Ritchie wrote:I think the confusion in that method is different from that, Fred.
Campbell Ritchie wrote:If you go from D to J, as I said earlier, what does your minimal_distance() method return? Now, what happens if you go from J to D? What would happn if you go from Y to D?
Campbell Ritchie wrote:Well, you have found one shortcut, that you add the complete length to your total, not 1 per letter.
Campbell Ritchie wrote:
1: I don't think your method is correctly calculating the shorter distance between pickups. Did you try D→J, J→D and Y→D? 2: As Fred said yesterday, you need to add 1″ to the time. What you did in the older version of the method is add 1 foot to the distance.
D.J. Quavern wrote:2. oooh. Ok, I was really confused! I don't know why I did that retrospectively...
alphabet = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ '")
Liutauras Vilda wrote:English alphabet has 26 letters. Everywhere in your calculations you use 28. So again, the talk is about those 2 characters which follow after Z.
D.J. Quavern wrote:Please read first the problem description. The Kattis-server is on maintenance today, but you will understand if you read it.
Earlier, I wrote:OR some other approach to problem to achieve whatever there is in that Kattis-server, so the code wouldn't be puzzling.