上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 42 下一页
摘要: #include<iostream> using namespace std; int main(){ int i,sum,n,data[15][2]; while(scanf("%d",&n)==1&&n!=-1){ sum = 0; scanf("%d%d",&data[0][0],&data[ 阅读全文
posted @ 2021-11-18 10:51 智人心 阅读(28) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int main(){ char a[20][30]; int i,j,n,cnt; cnt = 0; while(scanf("%d",&n)==1&&n){ for(i=0;i<n;i++){ scanf("%s", 阅读全文
posted @ 2021-11-18 10:44 智人心 阅读(37) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int main(){ int i,j,k,s,n; while(scanf("%d",&n)==1&&n){ s = 0; k = 0; for(i=1;;i++){ for(j=1;j<=i;j++){ s += i 阅读全文
posted @ 2021-11-18 10:35 智人心 阅读(28) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstring> using namespace std; int data[150],len; void multiply(int tmp){ int i,j; for(i=0;i<len;i++){ data[i] *= tmp; } fo 阅读全文
posted @ 2021-11-17 22:08 智人心 阅读(32) 评论(0) 推荐(0)
摘要: /* Sample Input 1 2 3 0 ; three different stamp types 7 4 0 ; two customers 1 1 0 ; a new set of stamps (two of the same type) 6 2 3 0 ; three custome 阅读全文
posted @ 2021-11-17 17:02 智人心 阅读(36) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int main(){ int n,i,j,p,q,t; while(scanf("%d",&n)==1){ for(i=1;;i++){ if(i*(i+1)/2>=n){ break; } } t = i*(i+1) 阅读全文
posted @ 2021-11-17 12:30 智人心 阅读(32) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstring> using namespace std; int main(){ char a[100005],b[100005]; int i,j,len_a,len_b; while(scanf("%s%s",a,b)==2){ len_ 阅读全文
posted @ 2021-11-17 10:54 智人心 阅读(29) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int main(){ int i,s = 0,n; scanf("%d",&n); for(i=1;;i++){ s += i; if(s==n)break; if(s-n>0&&(s-n)%2==0)break; } 阅读全文
posted @ 2021-11-17 10:46 智人心 阅读(34) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; #define PI 3.1415927 int main(){ double ans_d,ans_mph,d,t; int r,cnt = 0; while(scanf("%lf%d%lf",&d,&r,&t)==3& 阅读全文
posted @ 2021-11-17 10:37 智人心 阅读(32) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int f(int M,int N){ if(M==0||N==1){ return 1; } if(M<N){ return f(M,M); } return f(M,N-1)+f(M-N,N); } int main 阅读全文
posted @ 2021-11-16 15:38 智人心 阅读(27) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 42 下一页