generate functionWed, 08 Feb 2023

The two decided to compete in typing on the Button Racing website. During the execution, you must enter the text from the characters. The first participant types one character in v1 milliseconds and has a ping of t1 milliseconds. The second participant types one character in v2 milliseconds and has a ping of t2 milliseconds. Joining with ping (latency) in t millisecond contests for adherents: Exactly t milliseconds after the start of the competition, the participant receives a text that must be entered. Immediately after that, he starts typing this text. Exactly t milliseconds after he retyped the entire text, the site receives information about it. The winner in the competition is the participant whose success information came first. If the information came from opposite sides, it turned out that there was a draw. According to the given description of the text and information about the available, defined source data. Input data The first line contains five values of numbers s, v1, v2, t1, t2 (1 ≤ s, v1, v2, t1, t2 ≤ 1000) — the number of characters in the text, the speed of typing with the first number, the speed of typing first, ping of the first presence and ping of the second content. Output If the first participant wins, print "First". If the second participant wins, print "Second". In case of a draw, print "Friendship".

s = int(input()) v1 = int(input()) v2 = int(input()) t1 = int(input()) t2 = int(input()) time1 = v1 * s + 2 * t1 time2 = v2 * s + 2 * t2 if time1 < time2: print('First') elif time1 > time2: print('Second') else: print('Friendship')

Questions about programming?Chat with your personal AI assistant