HDU---Bigzhugod's fans

Source: Internet
Author: User

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 input5i am bigzhugod? I am BIGZHUGOD.I am bigzhugod! I AM BIGZHUGOD!!! I AM BIGZHUGOD!!!!! Sample output-_-Orz wow! wooow! wooooow!

The problem is still more water ...

But in the process of AC encountered a few small problems ...

Enter a string method with spaces: string S; Getline (CIN, s) or Char s[100]; Fgets (S, N, stdin);

As if the other method ignores the space and then the character following the space as the next string ...

#include <iostream>#include<string>#include<cstdio>using namespacestd;#defineMAXN 1005intMain () {intT; CIN>>T; T= t+1;  while(t--){        strings;        Getline (CIN, s); intLen =s.size (); Switch(s[len-1]){             Case '?':p rintf ("-_-\n"); Break;  Case '.':p rintf ("orz\n"); Break;  Case '!': {printf ("W"); intFlag =0;  for(intI=0; i<len; i++){                    if(S[i] = ='!') flag++; }                 for(intj=0; j<flag; J + +) {printf ("o"); } printf ("w!\n");  Break; }         }    }        return 0;}

HDU---Bigzhugod's fans

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.