prithivMLmods/Coder-Stat
Coder-Stat Dataset Overview The Coder-Stat dataset is a collection of programming-related data, including problem IDs, programming languages, original statuses, and source code snippets. This dataset is designed to assist in the analysis of coding patterns, error types, and performance metrics. Dataset Details Modalities Tabular: The dataset is structured in a tabular format. Text: Contains text data, including source code snippets.… See the full description on the dataset page: https://huggingface.co/datasets/prithivMLmods/Coder-Stat.
3139
1 2<H1><font color="#000000">Problem I:</font> A Piece of Cake</H1>3 4<p>5In the city, there are two pastry shops. One shop was very popular because its cakes are pretty tasty. 6However, there was a man who is displeased at the shop. He was an owner of another shop. Although cause of his shop's unpopularity is incredibly awful taste of its cakes, he never improved it. He was just growing hate, ill, envy, and jealousy.7</p>8<p>9Finally, he decided to vandalize the rival.10</p>11<p>12His vandalize is to mess up sales record of cakes. The rival shop sells <i>K</i> kinds of cakes and sales quantity is recorded for each kind. He calculates sum of sales quantities for all pairs of cakes. Getting <i>K</i>(<i>K</i>-1)/2 numbers, then he rearranges them randomly, and replace an original sales record with them.13</p>14<p>15An owner of the rival shop is bothered. Could you write, at least, a program that finds total sales quantity of all cakes for the pitiful owner?16</p>17 18<H2>Input</H2>19 20<p>21Input file contains several data sets.22A single data set has following format:23</p>24 25<pre>26<i>K</i>27<i>c</i><sub>1</sub> <i>c</i><sub>2</sub> ... <i>c</i><sub><i>K</i>×(<i>K</i>-1)/2</sub>28</pre>29 30<p>31<i>K</i> is an integer that denotes how many kinds of cakes are sold. <i>c<sub>i</sub></i> is an integer that denotes a number written on the card.32</p>33<p>34The end of input is denoted by a case where <i>K</i> = 0. You should output nothing for this case.35</p>36 37<H2>Output</H2>38 39<p>40For each data set, output the total sales quantity in one line.41</p>42 43<H2>Constraints</H2>44<ul>45<li>Judge data contains at most 100 data sets.</li>46<li>2 ≤ <i>K</i> ≤ 100</li>47<li>0 ≤ <i>c<sub>i</sub></i> ≤ 100 </li>48</ul>49 50<H2>Sample Input</H2>51<pre>522532543555 4 356057</pre>58 59<H2>Output for the Sample Input</H2>60<pre>61262663</pre>64 65 