Implement the function calculate_total_paintings(N, K) that calculates the total number of different appearances for decorating N rooms, divided into two painting responsibilities:
HELL will paint the first K rooms.
Printf will paint the remaining N-K rooms.
Functionality Requirements:
The function should calculate the total number of ways HELL can paint the first K rooms using any color.
The function should calculate the total number of ways Printf can paint the remaining N-K rooms with any color.
The function must compute the total number of distinct appearances, taking into account that both decorators avoid painting all rooms in white.
Input Requirements:
The function will take two integer parameters:
N (1 ≤ N ≤ 10^6): the total number of rooms.
K (0 ≤ K ≤ N): the number of rooms painted by HELL.
Output Requirements:
The function must return an integer representing the total number of different possible appearances of the painted rooms.
Implementation Details:
The calculation will involve using powers of 10 to determine the number of color combinations, and it should handle large numbers appropriately.
Code File:
The solution must be implemented in a file located at /app/solution.py.