Team Ai
Datasetpublic

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.

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
3likes139downloads
p00735.html125 linesDownload Raw Back to problem_descriptions
1 2<h1><font color="#000000">Problem B: </font>Monday-Saturday Prime Factors</h1>3<!-- end en only -->4 5<p>6Chief Judge's log, stardate 48642.5.7We have decided to make a problem from elementary number theory.8The problem looks like finding all prime factors of a positive integer,9but it is not.10</p>11<!-- end en only -->12<!-- begin en only -->13<p>14A positive integer whose remainder divided by 7 is either 1 or 6 is called15a 7<b><i>N</i></b>+{1,6} number.16But as it is hard to pronounce,17we shall call it a <em>Monday-Saturday number</em>.18</p>19<!-- end en only -->20<!-- begin en only -->21<p>22For Monday-Saturday numbers <I>a</I> and <I>b</I>,23we say <I>a</I> is a Monday-Saturday divisor of <I>b</I>24if there exists a Monday-Saturday number <I>x</I>25such that <I>a</I><I>x</I> = <I>b</I>.26It is easy to show that27for any Monday-Saturday numbers <I>a</I> and <I>b</I>,28it holds that <I>a</I> is29a Monday-Saturday divisor of <I>b</I>30if and only if31<I>a</I> is a divisor of <I>b</I> in the usual sense.32</p>33<!-- end en only -->34<!-- begin en only -->35<p>36We call a Monday-Saturday number a <em>Monday-Saturday prime</em>37if it is greater than 1 and has no Monday-Saturday divisors38other than itself and 1.39A Monday-Saturday number which is a prime in the usual sense40is a Monday-Saturday prime41but the converse does not always hold.42For example, 27 is a Monday-Saturday prime43although it is not a prime in the usual sense.44We call a Monday-Saturday prime45which is a Monday-Saturday divisor of a Monday-Saturday number <I>a</I>46a <em>Monday-Saturday prime factor</em> of <I>a</I>.47For example, 27 is one of the Monday-Saturday prime factors of 216,48since 27 is a Monday-Saturday prime49and 216 = 27 &times; 8 holds.50</p>51<!-- end en only -->52<p>53<!-- begin en only -->54Any Monday-Saturday number greater than 155can be expressed as a product of one or more Monday-Saturday primes.56The expression is not always unique57even if differences in order are ignored.58For example,59<!-- end en only -->60216 = 6 &times; 6 &times; 6 = 8 &times; 2761<!-- begin en only -->62holds.63<!-- end en only -->64</p>65<!-- begin en only -->66<p>67Our contestants should write a program that outputs68all Monday-Saturday prime factors69of each input Monday-Saturday number.70</p>71<!-- end en only -->72 73 74<h3>Input</h3>75 76<!-- begin en only -->77<p>78The input is a sequence of lines each of which contains a single79Monday-Saturday number.80Each Monday-Saturday number is greater than 181and less than 300000 (three hundred thousand).82The end of the input is indicated by a line83containing a single digit 1.84</p>85<!-- end en only -->86 87 88<h3>Output</h3>89 90<!-- begin en only -->91<p>92For each input Monday-Saturday number,93it should be printed, followed by a colon `:'94and the list of its Monday-Saturday prime factors on a single line.95Monday-Saturday prime factors should be listed in ascending order96and each should be preceded by a space.97All the Monday-Saturday prime factors should be printed only once98even if they divide the input Monday-Saturday number more than once.99</p>100<!-- end en only -->101 102 103<h3>Sample Input</h3>104 105<pre>1062059201072621441082622001092799361102999981111112</pre>113 114 115<h3>Output for the Sample Input</h3>116 117<pre>118205920: 6 8 13 15 20 22 55 99119262144: 8120262200: 6 8 15 20 50 57 69 76 92 190 230 475 575 874 2185121279936: 6 8 27122299998: 299998123</pre>124 125