Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define gc c=getchar()
- #define r(x) read(x)
- #define ll long long
- template<typename T>
- inline void read(T&x){
- x=0;T k=1;char gc;
- while(!isdigit(c)){if(c=='-')k=-1;gc;}
- while(isdigit(c)){x=x*10+c-'0';gc;}x*=k;
- }
- int main(){
- // freopen(".in","r",stdin);
- // freopen(".out","w",stdout);
- long double a,b;
- cin>>a>>b;
- ll A=round(a*1000000000);
- ll B=round(b*1000000000);
- printf("%.20lf",(A%B)/1000000000.0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement