摘要: //计算循环小数,并找出循环节以及循环节的长度,最后输出时若循环节大于50最后输出省略号。 //求循环小数,记录被除数,若被除数相同了则证明循环了。 //注意:即使是循环小数,但可能并不是从第一位小数开始循环 #include #include #include using namespace std; int rm[1010]; int vis[1000010]; int rec... 阅读全文
posted @ 2017-11-06 21:37 可馨517 阅读(476) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define size 100 #define resize 10 typedef struct Bitnode{ //定义结点 char data; struct Bitnode *lchild,*rchild; }Bitnode,*Bitree; typedef struct { ... 阅读全文
posted @ 2017-11-02 11:47 可馨517 阅读(647) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define Size 100 #define Resize 10 typedef struct Bitnode{ //定义结点 char data; struct Bitnode *lchild,*rchild; }Bitnode,*Bitree; typedef struct Stack{ ... 阅读全文
posted @ 2017-11-02 11:39 可馨517 阅读(201) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; typedef long long ll; int main() { ll n; while(~scanf("%lld",&n)&&n) { if(n<0) //将前缀提前输出 { n=... 阅读全文
posted @ 2017-11-02 11:31 可馨517 阅读(199) 评论(0) 推荐(0) 编辑
摘要: #include int reverse(int num) { int ans=0; while(num>0) { ans=ans*10+num%10; num=num/10; } return ans; } int main() { int num; while(scanf("%d",&num)!=EOF)... 阅读全文
posted @ 2017-07-31 16:09 可馨517 阅读(162) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int at,bt; int judge(int m,int n,int p) { if(at) return 0; if(m==1&&n==1){ at=1; return 0; } if(n==1) bt=1; whil... 阅读全文
posted @ 2017-07-31 16:08 可馨517 阅读(228) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;void Invert(char arr[],int &i,char str[]) { if(arr[i]=='\0') return; else { str[i]=arr[i]; i++; Invert(arr,i,st 阅读全文
posted @ 2017-05-01 11:27 可馨517 阅读(775) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;void fun(int x=3,int y=5,int z=7){ cout<<"x="<<x<<",y="<<y<<",z="<<z<<endl;}int main(){ fun(1,2,3); fun(1,2); fu 阅读全文
posted @ 2017-05-01 11:25 可馨517 阅读(219) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std; int main(){ unsigned int x; cin>>x; int a,i=0,j=0,max=0; while(x>0) { a=x%10; if(a==0) j++; if(a>max) max=a; x= 阅读全文
posted @ 2017-04-23 22:08 可馨517 阅读(452) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;typedef struct student { char name[10]; int ID; int age; float score[3]; float sum;}student;int main(){ int i, j 阅读全文
posted @ 2017-04-23 22:02 可馨517 阅读(4628) 评论(0) 推荐(0) 编辑