from random import *
def QI():
  m=uniform(0,1)
  if m<0.11:
    return 1
  else:
    return 0

def repete(n):
  s=0
  for k in range(n):
    s=s+QI()
  f=s/n
  return(f)

def Freq(N,n):
  F=[]
  for k in range(N):
    F.append(repete(n))
  return(F)

from math import*
def ecart_type(L):
  somme=0; var=0
  for k in L:
    somme = somme + k
  moy = somme/len(L)
  for x in L:
    var = var + (x - moy)**2
  var = var/len(L)
  return sqrt(var)

def intervalle_k(N,n,k):
  F=Freq(N,n)
  s=ecart_type(F)
  c=0
  for x in F:
    if x>0.11-k*s and x<0.11+k*s:
      c=c+1
  return c
