Advertisement
SelinD

v77s3e3

Mar 4th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. int p=1,n,k,nr=0,i;
  7. double x;
  8. cin>>n>>k;
  9. for(i=1; i<=k; i++) p=p*10;
  10. while(n>0)
  11. {
  12. n--;
  13. cin>>x;
  14. x=x-(int)x;
  15. x=x*p;
  16. if(abs(x-(int)x)>0.00001) nr++;
  17. }
  18. cout<<nr;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement