摘要:
#include int main() { int count = 0; int n; scanf("%d",&n); while(n>1) { if(n%2==1) n=n*3+1; else n/=2; count++; } printf("%d\n",count); ... 阅读全文
摘要:
#include int main(){ int i,n; scanf("%d",&n); float sum=0.0; float a=1; float b=2; for(i=1;i<=n;i++){ sum=sum+1.0*b/a; int c=a; a=b; b=c+b; ... 阅读全文