摘要:
#include<iostream> using namespace std; __int64 gcd(__int64 a,__int64 b) { return b?gcd(b,a%b):a; } __int64 lcm(__int64 a,__int64 b) { return a/gcd(a, 阅读全文
posted @ 2017-01-25 00:14
王坤1993
阅读(146)
评论(0)
推荐(0)
摘要:
#include <stdio.h> int calc(int a, int b) { if(a==0 || a==1 || a==5 || a==6) return a; if(a==2) { if(b%4==1) return 2; if(b%4==2) return 4; if(b%4==3) 阅读全文
posted @ 2017-01-25 00:13
王坤1993
阅读(185)
评论(0)
推荐(0)
摘要:
#include <stdio.h> int main() { int k, a, i, flag; while(~scanf("%d", &k)) { for(i=0; i<66; i++) { if((18+k*i)%65==0) break; } if(i<66) printf("%d\n", 阅读全文
posted @ 2017-01-25 00:13
王坤1993
阅读(151)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; int main() { int n,m,a,sum=0; while(cin>>n) { while (n--) { cin>>m; sum=0; while (m--) { cin>>a; sum=sum+a; } 阅读全文
posted @ 2017-01-25 00:12
王坤1993
阅读(237)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; int main() { int b,a; while(cin>>a>>b) { cout<<a+b<<endl<<endl; } return 0; } 阅读全文
posted @ 2017-01-25 00:11
王坤1993
阅读(185)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int n; while(cin>>n){ int sum=0; int i,m; for(i=1;i<=n;++i){ cin>>m; sum+=m; } cout<<sum<<endl; } re 阅读全文
posted @ 2017-01-25 00:09
王坤1993
阅读(233)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; int main() { int n,m,a,sum=0; while(cin>>n) { while (n--) { cin>>m; sum=0; while(m--) { cin>>a; sum=sum+a; } 阅读全文
posted @ 2017-01-25 00:08
王坤1993
阅读(191)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; int main() { int n,a,sum=0; while(cin>>n&&n!=0) { while (n--) { cin>>a; sum=sum+a; } cout<<sum<<endl; sum=0; 阅读全文
posted @ 2017-01-25 00:07
王坤1993
阅读(214)
评论(0)
推荐(0)
摘要:
#include<stdio.h>int main(){ int a,b; while(scanf("%d%d",&a,&b)==2) { if(a==0&&b==0) break; else printf("%d\n",a+b); } return 0; } 阅读全文
posted @ 2017-01-25 00:05
王坤1993
阅读(153)
评论(0)
推荐(0)

浙公网安备 33010602011771号