Problem1380--求单链表结点的阶乘和

1380: 求单链表结点的阶乘和

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 0  Solved: 1
[Submit] [Status] [Web Board] [Creator:]

Description

本题要求实现一个函数,求单链表L结点的阶乘和。这里默认所有结点的值非负,且题目保证结果在int范围内。 函数接口定义: int FactorialSum( List L ); 其中单链表List的定义如下: typedef struct Node *PtrToNode; struct Node { int Data;

Input

单链表L

Output

单链表L

Sample Input Copy

3
5 3 6

Sample Output Copy

846

Source/Category