Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 0 Accepted Submission(s): 0
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { string s1,s2,s3; cin>>s1; cin>>s2; cin>>s3; int len=s3.length(); if(s3[len-1]==‘?‘) { cout<<"-_-"<<endl; } else if(s3[len-1]==‘.‘) { cout<<"Orz"<<endl; } else { int sum=0; for(int i=0;i<len;i++) { if(s3[i]==‘!‘) { sum++; } } // cout<<sum<<endl; cout<<"W"; for(int i=1;i<=sum;i++) { cout<<"o"; } cout<<"w!"<<endl; } } return 0; }
杭州电子科技大学程序设计竞赛(2016’12)- 网络同步赛 1001
原文:http://www.cnblogs.com/yinghualuowu/p/6217888.html