Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
矩阵对角线上元素乘积
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 341, Accepted users: 311
Problem 10470 : No special judgement
Problem description
  求n*nn<10)矩阵对角线上元素之乘积。

Input
  第一行一个整数T,表示有T组数据。每组数据的第一行为n,表示矩阵为n行n列,接下来n行代表矩阵的n行数据,数据均为整数,保证运算结果及中间结果均不超过int64。

Output
  对于每组测试数据,输出结果,换行。

Sample Input
2
2
1 2
3 4
3
1 2 3
4 5 6
7 8 9
Sample Output
24
945
Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2175 today,16258902 total, since 2010-05-07