Ad
Code
Diff
  • class Solution:
        def __init__(self, n):
            self.n = n        
            
        def number_se7en(self):
            return (self.n - 1) // 7 + 1
    
    • class Solution:
    • def __init__(self, n):
    • self.n = n
    • def number_se7en(self):
    • ctr = 0
    • while self.n > 0:
    • self.n -= 7
    • ctr += 1
    • return ctr
    • return (self.n - 1) // 7 + 1