摘要:
#include<iostream>using namespace std;int main(){ int n; cin>>n; cin.ignore(); while(n--) { long long a; cin>>a; cin.ignore(); if(a<0) a=-a; if(a==0) cout<<"3"<<endl; else { long long temp=0; ... 阅读全文
摘要:
#include<iostream>using namespace std;int main(){ int n,v=1; while(cin>>n) { cin.ignore(); if(n==0)break; int i,j,a[60],sum=0; for(i=0;i<n;i++) { cin>>a[i]; cin.ignore(); sum+=a[i]; } sum=sum/n; int fla... 阅读全文
摘要:
#include<iostream>#include<cmath>using namespace std;int main(){ int m,n; while(cin>>m>>n) { if(m==0&&n==0)break; if(m==n&&n==1) cout<<"0 1"<<endl; else { int k=1; for(k=1;;k++) { if((int)(pow(1+pow(n,1.0... 阅读全文
摘要:
#include<iostream>#include<map>#include<string>using namespace std;int main(){ string s; while(getline(cin,s)) { string sa,sb; sa=s.substr(0,6); sb=s.substr(6,6); } return 0;} 阅读全文
摘要:
#include<iostream>#include<string>using namespace std;int main(){ int n; cin>>n; cin.ignore(); while(n--) { string m; getline(cin,m); if(m.compare("78")==0||m.compare("1")==0||m.compare("4")==0) cout<<"+"<<endl; else if(m[m.length 阅读全文
摘要:
#include<iostream>#include<cstdio>#include<cmath>using namespace std;int main(){ double n,p; double temp; while(scanf("%lf%lf",&n,&p)==2) { temp=pow(p,1/n); printf("%.lf\n",temp); } return 0;} 阅读全文
摘要:
#include<iostream>using namespace std;int main(){ int m; while(cin>>m) { if(m==0)break; if(m==1)cout<<"1 1"<<endl; else { int i,x=1,y=1; for(i=1;;i++) { if(m>=(i*i+1)&&m<=((i+1)*(i+1))) { ... 阅读全文
摘要:
#include<iostream>#include<string>#include<cstring>#include<cstdio>using namespace std;const int MAXN=1000;class BigNumber{public: int len,s[MAXN];public: void cleanLeadZero(); void multiplyTen(int n); void divisionTen(int n); string str() const; BigNumber(); BigNumber(int n) 阅读全文
摘要:
#include<iostream>#include<cctype>#include<algorithm>#include<string>#include<map>using namespace std;int main(){ map <char,char> ch_in; ch_in.insert(make_pair('A','2')); ch_in.insert(make_pair('B','2')); ch_in.insert(make_pair(' 阅读全文
摘要:
#include<iostream>#include<string>#include<algorithm>#include<cstdio>using namespace std;const string kStr("AJAJAJAJAJASASASASASABABABABABAKAKAKAKAKATUTUTUTUTUCUCUCUCUCULULULULULUDUDUDUDUDUMUMEMEMEMEVEVEVEVEVENENENENENEWEWEWEWEWEFEFEFOFOFOXOXOXOXOXOGOGOGOGOGOPOPOPOPOPOYO 阅读全文