#include <iostream> using namespace std; int main() { // your code goes here int a, n, k; cin>>a>>n>>k; while(k--) { cout<<a%(n+1)<<" "; a=a/(n+1); } return 0; }
25 4 4
0 0 1 0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!