As you probably already know, all members of MaratonIME use Telegram to communicate, for its amazing web and desktop apps, its bots and, of course, its stickers.
As time goes by, members eventually graduate and leave the group, a sad event for all. Victor "Sena" Sena, a member of MaratonIME, is tired of countless goodbyes, and has decided to do something about the void that fills his noble soul.
Sena realized that people in Brazil are becoming more and more alike, expressing themselves in the same way, with expressions like "kk eae men", "ata" and "zapzap". The members of MaratonIME are very similar as well, but they use different expressions.
Peculiarly, whenever someone asks a question, everyone answers "7". This is a tradition, from unknown origins, passed on by Germano "Germs" UnionFind. Besides, whenever someone says a sentence (that is not a question) and he mentions the dear member Gabriel "Sussu" Fernandes, all members yell in unison "AI SUSSU!". For any other sentence that doesn't fit any of these rules, the answer is "O cara é bom!" (this guy is good).
Figuring out these patterns, and using his incredible knowledge of software engineering, Sena decided to create a Telegram bot that simulates retired members of MaratonIME. He developed the whole platform, he just need the part that prints the answer for a given sentence, can you help him?
It has been agreed that a sentence is a question if it's last character is ?. Also, it is only said that there was a mention to Sussu's great name if one of the words in the sentence is exactly Sussu.
Input
The input consists of a single sentence, that is, a non-empty line, with space-separated words (strings with lower or upper case letters). The last character is always one among ., ! and ?. The line has at most 200 characters.
Output
Print what a MaratonIME member would answer to that sentence.
Examples
Input
Na viagem o Sussu comeu gelo achando que era gelatina.
Output
AI SUSSU!
Input
O Carlinhos zuou o Sussu!
Output
AI SUSSU!
Input
Bojack Horseman eh a melhor serie do Netflix.
Output
O cara é bom!
Input
Voce acredita na conjectura de Goldbach?
Output
7
Input
Eu estava andando e de repente sussu Susu SUSSU Sussussu Sussuzodia foi muito interessante.
Output
O cara é bom!
题目大意及思路:判断字符串中有没有单独的“Russu”,和“?”,如果有“?”直接输出7,有“Russu”输出“
AI SUSSU!”都没有的话,输出“O cara é bom!”
判断“Russu”时,判断在字符串的最开始,中间,最后面
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char a[1001000]; int i; int flag = 1; memset(a,0,sizeof(a)); gets(a); int len = strlen(a); if(a[len-1] == '?') { printf("7\n"); } else { for(i = 0; i <= len; i++) { if(a[len-6] == 'S' && a[len-5] == 'u' && a[len-4] == 's' && a[len-3] == 's' && a[len-2] == 'u') { printf("AI SUSSU!\n"); flag = 0; break; } else if(a[0] == 'S' && a[1] == 'u' && a[2] == 's' && a[3] == 's' && a[4] == 'u' && a[5] == ' ') { printf("AI SUSSU!\n"); flag = 0; break; } else if(a[i] == ' ' && a[i+1] == 'S' && a[i+2] == 'u' && a[i+3] == 's' && a[i+4] == 's' && a[i+5] == 'u' && a[i+6] == ' ') { printf("AI SUSSU!\n"); flag = 0; break; } } if(flag == 1) { printf("O cara é bom!\n"); } } return 0; }