K- difference problem solution