- 博客(5)
- 收藏
- 关注
原创 hdu 2899 Strange fuction
hdu 2899 Strange fuction 添加链接描述 #include<bits/stdc++.h> using namespace std; #define F(x,y) (x*(x*(x*(x*(x*(x*(6*x+8)))+7)+5)-y)) double solve(double l,double r,double y){ double lm,rm; while(r-1>1e-7){ lm=(2*1+r)/3; rm=(1+2*r)/3; if(F(lm,
2021-04-17 16:13:07
70
原创 hdu 2035 人见人爱A^B
hdu 2035 人见人爱A^B 添加链接描述 #include"stdio.h" #define LL long long int qp(LL a, LL b, int mod){ int res = 1; while(b){ if(b&1) res = res*a%mod; a = a*a%mod; b >>= 1; } return res; } int main(){ int a, b;
2021-04-11 20:58:31
57
原创 hdu 1021 Fibonacci Again
hdu 1021 Fibonacci Again 添加链接描述 #include"stdio.h" int f[15] = {1, 2, 0, 2, 2, 1, 0, 1, 1, 2}; int main(){ int n; while(scanf("%d", &n) == 1){ printf("%s\n", f[n%8]==0?"yes":"no"); } return 0; }
2021-04-11 20:42:25
87
原创 hdu 1019 Least Common Multiple
hdu 1019 Least Common Multiple 添加链接描述 #include “stdio.h” int gcd(int x, int y){ return y ? gcd(y, x % y) : x; } int lcm(int x, int y){ return x/gcd(x,y)*y; } int main(){ int T, m, x, ans; scanf("%d", &T); while(T--){ ans = 1
2021-04-11 15:15:20
47
原创 hdu 1108 最小公倍数
hdu 1108 最小公倍数 添加链接描述 #include"stdio.h" int gcd(int x,int y){ return y?gcd(y,x%y):x; } int lcm(int x,int y){ return x/gcd(x,y)*y; } int main() { int x,y; while(scanf("%d %d",&x,&y)==2){ printf("%d\n",lcm(x,y)); } return 0; } ...
2021-04-08 20:54:55
59
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人