← Back to List

15792번: A/B - 2 ↗

Solutions

C++14
229 B | 229 chars
#include <iostream>
#define MM 1100
using namespace std;
int A,B;
int main()
{
    cin>>A>>B;
    cout<<(int)(A/B)<<".";
    A=A%B;
    for(int x=0; x<MM; x++)
    {
        A*=10;
        cout<<(int)(A/B);
        A=A%B;
    }
}