#include <iostream>
#include <vector>
using namespace std;

int main(){
	int a,b,n;

	while( cin >> a >> b >> n ){
		double c = (double) a / b;
		vector<int> f;
		cout << c << endl;
		for(int i=0 ; i<n ; ++i ){
			f.push_back( ((int)(c*10) % 10) );
			c *= 10;
		}
		int sum = 0;
		for(int i=0 ; i<f.size() ; ++i ){
			sum += f[i];
		}
		cout << sum << endl;
	}
}