Submission #1067336


Source Code Expand

#include <stdio.h>

int main()
{
	unsigned long n;
	unsigned long factorial = 1UL;
	unsigned long divisor_num = 0UL;
	unsigned long ans = 0L;
	unsigned long i;
	
	scanf( "%ld", &n );

	for( i = 1UL; i <= n; i++)
	{
		factorial = factorial  * i;
	}

	for ( i = 1UL; i <= factorial; i++ )
	{
		if ( factorial % i )
		{
			/* NOP */
		}
		else
		{
			divisor_num++;
		}
	}

	ans = divisor_num % 1000000007;
	
	printf( "%ld\n", ans );
	
	return 0;
}

Submission Info

Submission Time
Task C - Factors of Factorial
User kskksk
Language C (GCC 5.4.1)
Score 0
Code Size 483 Byte
Status WA
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:11:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
  scanf( "%ld", &n );
  ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
WA × 1
AC × 2
WA × 5
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All subtask_1_certain_01.txt, subtask_1_certain_02.txt, subtask_1_certain_03.txt, subtask_1_certain_04.txt, subtask_1_rand_01.txt, subtask_1_rand_02.txt, subtask_1_rand_03.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1 ms 128 KB
sample_02.txt AC 1 ms 128 KB
sample_03.txt WA 1 ms 128 KB
subtask_1_certain_01.txt AC 1 ms 128 KB
subtask_1_certain_02.txt AC 1 ms 128 KB
subtask_1_certain_03.txt WA 1 ms 128 KB
subtask_1_certain_04.txt WA 1 ms 128 KB
subtask_1_rand_01.txt WA 1 ms 128 KB
subtask_1_rand_02.txt WA 1 ms 128 KB
subtask_1_rand_03.txt WA 1 ms 128 KB