Beginner Beginners Problems > Implementation

You are given a string of length **N**, say **S**. Your task is to determine whether the given string is **Tweety** or not. A string is called **Tweety string** if sum of [ascii][1] values of all characters in given string is divisible by **20**. Input: ------ Input starts with an integer **T (1<=T<=20)**, denoting the number of test cases. Each case contains a string **S** of size **N( 1<=N<=100 )**. Output: ------- For each case of input, output the "Yes" or "No" depending upon whether the given string is Tweety or not. Sample Input ------------ 2 ab dd Sample Output ------------- No Yes **Explanation**:<br> ---------- For first string "**ab**":<br> Ascii values for 'a' = 97<br> Ascii values for 'b' = 98<br> So, total summation = 97 + 98 = 195 , which is not divisible by 20. So, its not Tweety string. For second string "**dd**":<br> Ascii values for 'd' = 100<br> So, total summation = 100 + 100 = 200 , which is divisible by 20. So, its Tweety string. [1]: https://en.wikipedia.org/wiki/ASCII

Bishal Gautam

Language |
Time Limit (seconds) |

C | 1.00 |

C++ | 1.00 |

C++14 | 1.00 |

C# | 2.00 |

Go | 2.00 |

Java | 2.00 |

JavaScript | 2.00 |

Objective-C | 2.00 |

Perl | 2.00 |

PHP | 2.00 |

Python | 2.00 |

Python3 | 2.00 |

Ruby | 2.00 |

VB.Net | 2.00 |

Solve/Submission

# | User | Language | Timing |
---|---|---|---|

01 | inam | Cpp14 | 0.00s |

02 | DynamicOvi | Cpp | 0.00s |

03 | pulak_ict_mbstu | Cpp14 | 0.00s |

04 | subhashis_cse | Cpp | 0.00s |

05 | kzvd4729 | Cpp14 | 0.00s |

06 | ksohan | Cpp | 0.00s |

07 | Ataur | Cpp | 0.00s |

08 | Pure_Protea | Cpp14 | 0.00s |

09 | PKP_Junior | Cpp | 0.00s |

10 | Turin | Cpp | 0.00s |

11 | Jakir_Hossain_Sust | Cpp | 0.00s |

12 | 7Mahfuz | Cpp | 0.00s |

13 | mh755628 | Cpp | 0.00s |

14 | madcoder_ju | Cpp | 0.00s |

15 | moshiur_cse15 | Cpp14 | 0.00s |

16 | aaman007 | Cpp | 0.00s |

17 | nahid08 | Cpp | 0.00s |

18 | Tamim028 | Cpp | 0.00s |

19 | Zihad | Cpp | 0.00s |

20 | ronyrashedul36 | Cpp | 0.00s |

21 | Arpan_cse_2k14 | Cpp | 0.00s |

22 | MNIR | Cpp | 0.00s |

23 | Durbin | Cpp14 | 0.00s |

24 | maf_uu | Cpp | 0.00s |

25 | Mr_adnan | Cpp | 0.00s |

26 | alamin39 | Cpp14 | 0.00s |

27 | IIUC_minhazmiraz | Cpp14 | 0.00s |

28 | Nobel | Cpp | 0.00s |

29 | Silent_Warrior | Cpp | 0.00s |

30 | robin_aust | Cpp | 0.00s |

31 | Bisnu039 | Cpp | 0.00s |

32 | abinash | Cpp | 0.00s |

33 | sajjad_h | Cpp | 0.00s |

34 | ritoo | Cpp | 0.00s |

35 | fncse | Cpp | 0.00s |

36 | AlaminJust | Cpp | 0.00s |

37 | Ramprosad | Cpp14 | 0.00s |

38 | Bappy | Cpp14 | 0.00s |

39 | ehsan_sshuvo96 | Cpp | 0.00s |

40 | atik | Cpp | 0.00s |

41 | sourav_malo | C | 0.00s |

42 | loser_123 | Cpp | 0.00s |

43 | haliban_25 | C | 0.00s |

44 | n0515 | Cpp | 0.00s |

45 | Trusted_Frustrated | Cpp | 0.00s |

46 | MHR_MMAR | Cpp | 0.00s |

47 | Mr_KAJOL | Cpp | 0.00s |

48 | joy25896 | Cpp | 0.00s |

49 | JubayerSohel | Cpp14 | 0.00s |

50 | kabbya | Cpp | 0.00s |

Copyright © 2015-2016 Dev Skill.

Feedback
#### Your feedback is our precious!

## Thank you for providing feedback! Our developers will be happy :)

## Sorry there was a problem when submitting the feedback. Please try again. :(