Hangzhou Computer Program Design Competition (2016 ' 12)-Network synchronization 1001

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.