Problem:
How Many Divisors?

Write a program which reads three integers a, b and c, and prints the number of divisors of c between a and b.

Input

Three integers a, b and c are given in a line separated by a single space.

Output

Print the number of divisors in a line.

Constraints

1 ≤ a, b, c ≤ 10000

a ≤ b

Sample Input 1

5 14 80

Sample Output 1

3

Solution in C# (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
class ITP1
{
    static void Main(string[] args)
    {
        //var exStdIn = new System.IO.StreamReader("stdin.txt");
        //System.Console.SetIn(exStdIn);

        Q3_D();

        //int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s)));
    }

    static void Q1()
    {
        int input = int.Parse(Console.ReadLine());

        int h = input / 3600;
        int m = input % 3600 / 60;
        int s = input % 3600 % 60;

        Console.WriteLine(String.Format("{0}:{1}:{2}", h, m, s));
    }

    static void Q2_A()
    {
        int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s)));

        String sign = a[0] - a[1] > 0 ? ">" : a[0] - a[1] == 0 ? "==" : "<";

        Console.WriteLine(String.Format("a {0} b",sign));
    }

    static void Q2_B()
    {
        int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s)));
        String answer = a[2] - a[1] > 0 ? a[1] - a[0] > 0 ? "Yes" : "No" : "No";

        Console.WriteLine(answer);
    }

    static void Q2_C()
    {
        List<int> a = new List<int>(Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s))));
        a.Sort();

        Console.WriteLine(String.Format("{0} {1} {2}",a[0],a[1],a[2])); 
    }

    static void Q2_D()
    {
        int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s)));

        int chk = 0;

        //x-max
        if (a[0] - a[2] - a[4] >= 0) chk++;
        //x-min
        if (a[2] - a[4] >= 0) chk++;
        //y-max
        if (a[1] - a[3] - a[4] >= 0) chk++;
        //y-min
        if (a[3] - a[4] >= 0) chk++;

        String answer = chk == 4 ? "Yes" : "No";
        Console.WriteLine(answer);
        
    }

    static void Q3_A()
    {
        for (int i = 0; i < 1000; i++)
        {
            Console.WriteLine("Hello World");
        }
    }

    static void Q3_B()
    {
        String a = "";
        for (int i = 1; i <= 10000; i++)
        {
            a = Console.ReadLine();
            if (a != null)
            {
                Console.WriteLine("Case {0}: {1}", i, a);
            }
            else
            {
                break;
            }

        }
    }

    static void Q3_C()
    {
        while(true)
        {
            String str = Console.ReadLine();
            if (str == null || str == "0 0") break;
            int[] a = Array.ConvertAll(str.Split(' '), new Converter<String, int>(s => int.Parse(s)));
            
            List<int> tempList = new List<int>(a);
            tempList.Sort();
            Console.WriteLine(String.Format("{0} {1}",tempList[0],tempList[1]));
        }
    }

    static void Q3_D()
    {
        List<int> a = new List<int>(Array.ConvertAll(Console.ReadLine().Split(' '), new Converter<String, int>(s => int.Parse(s))));
        List<int> divisorList = new List<int>();
        for (int i = 1; i <= a[2]; i++)
        {
            if (a[2] % i == 0)
            {
                divisorList.Add(i);
            }
        }

        int Cnt = 0;
        for (int i = a[0]; i <= a[1]; i++)
        {
            if (divisorList.Contains(i))
            {
                Cnt++;
            }
        }

            Console.WriteLine(Cnt);
    }
}