数学基础
123~mutouren
这个作者很懒,什么都没留下…
展开
-
hdu Ignatius‘s puzzle 1098
#include <bits/stdc++.h> using namespace std; int main(){ int k; while(scanf("%d", &k) == 1){ k %= 65; for(int a = 0; a <= 64; a++){ if((18+a*k)%65 == 0){ printf("%d\n", a); b原创 2021-04-08 19:21:36 · 84 阅读 · 0 评论 -
Leftmost Digit Time Limit:
第一讲1060 #include<bits/stdc++.h> using namespace std; int ans(int n) { double c; c = n*log10(n);//对所求的数取对数,又任意的数都可以表示为 c = a+b 也即相应的小数部分和整数部分,floor()表示向下取整 return pow(10,c-floor(c));//log10()取对数后,(科学计数法)整数部分就是1,因此最高位与小数部分有关 } int main () { int n原创 2021-04-01 19:38:23 · 60 阅读 · 0 评论 -
hdu:Strange fuction 2899
#include<bits/stdc++.h> using namespace std; #define F(x) 6*pow(x,7)+8*pow(x,6)+7*pow(x,3)+5*pow(x,2)-y*x #define f(x) 42*pow(x,6)+48*pow(x,5)+21*pow(x,2)+10*x-y double ans(double y) { double mid,l = 0,r = 100; while(r-l>1e-8) { mid = (l+r)/2原创 2021-03-30 19:41:58 · 84 阅读 · 1 评论