We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4820826 commit 97b6886Copy full SHA for 97b6886
calculate_circumference_and_area.py
@@ -0,0 +1,13 @@
1
+class Solution:
2
+ """
3
+ @param r: a Integer represent radius
4
+ @return: the circle's circumference nums[0] and area nums[1]
5
6
+ def calculate(self, r):
7
+ # write your code here
8
+ pi = 3.14
9
+ c = int(pi * 2.0 * r * 100.0)
10
+ s = int(pi * r * r * 100.0)
11
+ return [c / 100.0, s / 100.0]
12
+
13
+easy: https://www.lintcode.com/problem/calculate-circumference-and-area
0 commit comments