leetle

Daily challenge for 2026-03-06

430. Count Trailing Exclamation Marks

Given a string s, return the total number of exclamation marks (!) that appear at the very end of the string. If the string does not end with an exclamation mark, return 0.

Example:
Input: s = "Hello!!"
Output: 2

Run this challenge interactively in Python or JavaScript when the app loads.