摘要: import math def distance(a,b,c): d = math.sqrt(a*a + b*b + c*c) return d x,y,z=input().split(",") d=distance(float(x),float(y),float(z)) print("{:.2f} 阅读全文
posted @ 2021-10-01 01:45 白-white 阅读(188) 评论(0) 推荐(0)
摘要: func:if n!=0 then func(n-1, a, c, b) move a[n] to c func(n-1, b, a, c) endif 阅读全文
posted @ 2021-10-01 01:43 白-white 阅读(72) 评论(0) 推荐(0)
摘要: int febonaci(int n){ vector<int> v; v.push_back(1); v.push_back(2); for(int i=2;i<n;i++){ v.push_back(v[i-1]+v[i-2]); } cout<<v[n-1]<<endl;} 阅读全文
posted @ 2021-10-01 01:40 白-white 阅读(97) 评论(0) 推荐(0)