Problems Description
<p><style type="text/css">#toc, .toc, .mw-warning { border: 1px solid rgb(170, 170, 170); background-color: rgb(249, 249, 249); padding: 5px; font-size: 95%; }#toc h2, .toc h2 { display: inline; border: medium none; padding: 0pt; font-size: 100%; font-weight: bold; }#toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { text-align: center; }#toc ul, .toc ul { list-style-type: none; list-style-image: none; margin-left: 0pt; padding-left: 0pt; text-align: left; }#toc ul ul, .toc ul ul { margin: 0pt 0pt 0pt 2em; }#toc .toctoggle, .toc .toctoggle { font-size: 94%; }body { font-family: '宋体'; font-size: 10pt; text-align: justify; }table { }td { border-collapse: collapse; text-align: left; vertical-align: top; }p, h1, h2, h3, li { font-family: '宋体'; font-size: 10pt; text-align: justify; }</style> <div> <p style="text-align: justify; margin-bottom: 8pt; margin-top: 8pt;" dir="ltr"><span lang="zh-CN" style="font-family: '文泉驿等宽微米黑';">“当老大有什么意思!”小明如是想。于是他把班级里的同学按年龄排序,最为推崇Page 二大的同学了!然而,他也很推崇倒数Page 二大的同学。请问这两items同学相差多少岁?</span></p> </div> </p>
Input格式
<p><style type="text/css">#toc, .toc, .mw-warning { border: 1px solid rgb(170, 170, 170); background-color: rgb(249, 249, 249); padding: 5px; font-size: 95%; }#toc h2, .toc h2 { display: inline; border: medium none; padding: 0pt; font-size: 100%; font-weight: bold; }#toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { text-align: center; }#toc ul, .toc ul { list-style-type: none; list-style-image: none; margin-left: 0pt; padding-left: 0pt; text-align: left; }#toc ul ul, .toc ul ul { margin: 0pt 0pt 0pt 2em; }#toc .toctoggle, .toc .toctoggle { font-size: 94%; }body { font-family: '宋体'; font-size: 10pt; text-align: justify; }table { }td { border-collapse: collapse; text-align: left; vertical-align: top; }</style> <div> <p><span lang="zh-CN" style="font-family: '文泉驿等宽微米黑';">Page 一行是数据的组数 nCase (n<=5),每组测试数据的Page 一行是一items整数 n(n>=2) ,表示班级里有 n 位同学。以下是 n 位同学的年龄。</span></p> </div> </p>
Output格式
<p><style type="text/css">#toc, .toc, .mw-warning { border: 1px solid rgb(170, 170, 170); background-color: rgb(249, 249, 249); padding: 5px; font-size: 95%; }#toc h2, .toc h2 { display: inline; border: medium none; padding: 0pt; font-size: 100%; font-weight: bold; }#toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { text-align: center; }#toc ul, .toc ul { list-style-type: none; list-style-image: none; margin-left: 0pt; padding-left: 0pt; text-align: left; }#toc ul ul, .toc ul ul { margin: 0pt 0pt 0pt 2em; }#toc .toctoggle, .toc .toctoggle { font-size: 94%; }body { font-family: '宋体'; font-size: 10pt; text-align: justify; }table { }td { border-collapse: collapse; text-align: left; vertical-align: top; }</style> <div> <p><span lang="zh-CN" style="font-family: '文泉驿等宽微米黑';">年龄Page 二和倒数Page 二的同学的年龄差。</span></p> </div> </p>
Sample
Sample Input 1
2
50
16 19 4 25 20 5 28 28 30 26 13 18 2 14 1 30 14 2 3 17 6 6 24 16 16 30 2 29 16 27 9 29 24 7 14 5 7 6 13 1 21 1 18 8 5 6 2 7 14 7
20
9 29 24 7 14 5 7 6 13 1 21 1 18 8 5 6 2 7 14 7
Sample Output 1
29
23
Submit Code
请先Login后Submit
🤖 AI 解题助手
OpenRouter
就绪