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;    
     
class sample12{    
    static void Main(string[] args){
        int i ;
        int count = 0;
        int[] compared_number = new int[3];
        string[] str_number = Console.ReadLine().Split(' '); 
        
        //入力された数字をintへ変換
        for(i = 0 ; i < 3; i++){
                    compared_number[i] = int.Parse(str_number[i]);
        }
        
        //バリデーション
        if(compared_number[0] > compared_number[1]){ 
                    Console.WriteLine("bにはa以上の数字を入力してください。"); 
                    Environment.Exit(0);
                    
        }else if(compared_number[0] < 1 || compared_number[1] < 1 || compared_number[2] < 1 || compared_number[0] > 10000 || compared_number[1] > 10000 || compared_number[2] > 10000 ){
            
                    Console.WriteLine("入力した値は範囲外です。");
                    Environment.Exit(0);
        } 
                
        //約数ならカウントする
        for(i = compared_number[0]; i < (compared_number[1]+ 1); i++){
            if(compared_number[2] %i == 0){
                count++;
            }
        }
        Console.WriteLine(count);
    }    
}