Bigzhugod's fans
Time limit:2000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)
Total submission (s): 0 Accepted Submission (s): 0
Problem description A real fan, is not required to describe the ^_^ of the topic. Input data group number in first rowT(1≤t≤) 。
Next T line, one formatted string per line, see the sample, the string length does not exceed . Output Real fans, even if I don't give out the format, still can ac this problem.
^_^
Sample Input5 I am Bigzhugod? I am Bigzhugod. I am bigzhugod! I AM BIGZHUGOD!!! I AM BIGZHUGOD!!!!!
Sample Output-_-orzwow! wooow! wooooow! Solution: Look at the back of the symbol, and then beg! The number of outputs according to the sample column
#include <bits/stdc++.h>using namespacestd;intMain () {intT; CIN>>T; while(t--) { stringS1,s2,s3; CIN>>S1; CIN>>S2; CIN>>S3; intlen=s3.length (); if(s3[len-1]=='?') {cout<<"-_-"<<Endl; } Else if(s3[len-1]=='.') {cout<<"Orz"<<Endl; } Else { intsum=0; for(intI=0; i<len;i++) { if(s3[i]=='!') {sum++; } } //cout<<sum<<endl;cout<<"W"; for(intI=1; i<=sum;i++) {cout<<"o"; } cout<<"w!"<<Endl; } } return 0;}
Hangzhou Computer Program Design Competition (2016 ' 12)-Network synchronization 1001