Generate Repetitive Digit Strings and Base Conversion in Python

Generate a Number with B Repeated Digits A Given two integesr A and B, where 1 ≤ A ≤ 9 and 1 ≤ B ≤ 10, construct a number consisting of the digit A repeated exactly B times. Input format: Two integers A and B, separated by a comma (possibly with whitespace). Output format: A single integer formed by repeating A, B times. Example Input: 1, 5 Exa ...

Posted on Wed, 05 Aug 2026 16:59:51 +0000 by jackliu97

Base Number Conversion Algorithms and Implementation

Problem B: Arbitrary Base Conversion This code converts a number from one arbitrary base to another. Implementation #include <stdio.h> #include <string.h> // Convert from base `src_base` string `src_num` to decimal integer. int convert_to_decimal(int src_base, const char *src_num) { int result = 0; int place_value = 1; ...

Posted on Mon, 18 May 2026 01:51:55 +0000 by thebluebus