Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit de8a3e4

Browse files
Commit
1 parent b084510 commit de8a3e4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

‎Implimentation/Kangaroo.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/python3
2+
3+
import math
4+
import os
5+
import random
6+
import re
7+
import sys
8+
9+
# Complete the kangaroo function below.
10+
def kangaroo(x1, v1, x2, v2):
11+
12+
if __name__ == '__main__':
13+
fptr = open(os.environ['OUTPUT_PATH'], 'w')
14+
15+
x1V1X2V2 = input().split()
16+
17+
x1 = int(x1V1X2V2[0])
18+
19+
v1 = int(x1V1X2V2[1])
20+
21+
x2 = int(x1V1X2V2[2])
22+
23+
v2 = int(x1V1X2V2[3])
24+
25+
result = kangaroo(x1, v1, x2, v2)
26+
27+
fptr.write(result + '\n')
28+
29+
fptr.close()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /