#include <iostream> #include <cstring> #include <vector> using namespace std; int main() { int a, b , c; cin >> a >> b>> c; long long sum = a+b; int arr[40] ={0}; int i=0; if(sum == 0) cout << 0 ; else {
while(sum != 0 ){ arr[i] += (sum % c) ; sum = sum /c ; // key i++; }