9x9

ABC 389

Problem 27 of 50

Easy

What to do

Given a string in the format 'AxB' where A and B are single digits (1-9), return their product A × B as an integer. For example, '3x8' → 24.

Key Concepts

string manipulation basic math input/output

Examples

Input: s = '3x8'

Output: 24

Input: s = '9x9'

Output: 81

Tips for Beginners

  • Focus on understanding the logic, not memorizing syntax
  • Use print statements to debug your code
  • Don't worry about input parsing - the function handles that for you
  • If stuck, try writing out your solution on paper first

Python Editor

Loading Python...