TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P7831
  • Problem
  • P7831表达式求值
    Limits : Time Limit : - MS   Memory Limit : - KB
    Judgment Tips : 1s 256MB
    Description

    计算下列表达式的值

    Input Format

    第一行输入一个整数 \(T\) ,接下来有 \(T\) 组测试数据。

    接下来 \(T\) 组数据,第一行输入一个整数 \(n\) ,第二行输入 \(n\) 个数

    $1\le T\le 1000$

    \(1\le n,a[i]\le 10\)

    Output Format

    对于每一组测试数据。输出一个最简分式代表表达式的值

    Sample Input

    3
    2
    2 2
    4
    1 2 3 4
    1
    1

    Sample Output

    2/5
    30/43
    1/1