http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=10008
#include <iostream> #include <vector> using namespace std; int main (int argc, char * const argv[]) { // insert code here... float a,b; while (cin >> a >> b) { int d = a / b; int r = int(a)% int(b); float f = a / b; printf("%d %d %f\n",d,r,f); break; } return 0; }