上一页 1 ··· 5 6 7 8 9
摘要: 1 import java.util.*; 2 import java.math.*; 3 public class Main 4 { 5 public static void main(String []args) 6 { 7 Scanner cin=new Scanner(System.in); 8 int i,n; 9 while(cin.hasNext())10 { 11 n=cin.nextInt();12 BigInteger s1 = BigIn... 阅读全文
posted @ 2012-06-21 17:15 欧阳生朵 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include <stdio.h> 3 using namespace std; 4 #define MOD 10 5 #define END -1 6 7 int bignum[1000] ; 8 void MulBigSmall(int a[],int n) 9 {10 int i, cc=0;//进位标志11 for(i=1; i<= a[0] ; i++)12 {13 a[i] = a[i] * n+ cc;14 cc= a[i] / MOD;15 a[i] %=... 阅读全文
posted @ 2012-06-21 17:12 欧阳生朵 阅读(230) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;int main(){ int a,i; while(~scanf("%d",&a)) { if(a==0) printf("1\n"); else if(a<2009) { int count=1; for(i=1;i<=a;i++) count=count*i%2009; printf("%d\n",count); } else if(a>=2009) printf("0\n"); } return 阅读全文
posted @ 2012-06-20 18:43 欧阳生朵 阅读(215) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;import java.math.*;public class Main{ public static void main(String []args) { Scanner cin=new Scanner(System.in); int i,n; while(cin.hasNext()) { n=cin.nextInt(); BigInteger s1 = BigInteger.valueOf(1); BigInteger s2 = BigInteger.valueOf(1); BigInteger s3... 阅读全文
posted @ 2012-06-20 18:14 欧阳生朵 阅读(275) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cmath>using namespace std;int fac[21]={0,1,1};const double f=(sqrt(5.0)+1.0)/2.0;int main(){ double bit; int n,i; for(i=3;i<=20;i++) fac[i]=fac[i-1]+fac[i-2];//求前20项 while(cin>>n) { if(n<=20) { cout<<fac[n]<<endl; ... 阅读全文
posted @ 2012-06-20 09:42 欧阳生朵 阅读(257) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9