Number Base Converter
Medium
math
base-conversion
string
Problem Description
Convert a number from one base to another base. Support bases 2 to 36.
Input Format
Three lines: number (as string), source base, target base
Output Format
Converted number in target base (uppercase for digits > 9)
Constraints
2 ≤ bases ≤ 36, number length ≤ 20
Sample Input/Output
Input:
1010 2 10
Output:
10
Explanation
Binary 1010 equals decimal 10
Solution Hints
- Read carefully: Understand input/output format and constraints
- Start simple: Think of brute force solution first, then optimize
- Edge cases: Consider empty inputs, single elements, max constraints
- Data structures: Choose arrays, hash maps, sets based on problem needs
- Time complexity: Ensure your solution fits within time limits
- Test examples: Verify logic with provided sample inputs
160
Points
Points
2000ms
Time Limit
Time Limit
256MB
Memory Limit
Memory Limit
Code Editor
Register to Access Code Editor
Create a free account to solve coding problems and track your progress.
Register Now