-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.html
10 lines (10 loc) · 1.18 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
<h2>Frequency Dictionary</h2>
<html>
<head></head>
<body>
<p>When Anton finished reading "War and Peace", he decided to find out the number of specific words used in the book.</p>
<p>Help Anton and write a simplified version of such a program, that will be capable of counting the words separated with space, and print the statistics.</p>
<p>The program must prompt a user for 1 line and print out each unique word with the number of its usages in the line in the following format "word amount" (case insensitive!). The word order does not matter, each word must be printed only once.<br> </p>
</body>
</html><br><b>Sample Input:</b><br><pre><code class="language-no-highlight">a aa abC aa ac abc bcd a</code></pre><br><b>Sample Output:</b><br><pre><code class="language-no-highlight">a 2<br>aa 2<br>abc 2<br>ac 1<br>bcd 1</code></pre><br><br><b>Sample Input:</b><br><pre><code class="language-no-highlight">a A a</code></pre><br><b>Sample Output:</b><br><pre><code class="language-no-highlight">a 3</code></pre><br><br><br><font color="gray">Memory limit: 256 MB</font><br><font color="gray">Time limit: 5 seconds</font><br><br>
<a href="https://hyperskill.org/learn/step/9008">Show topic summary</a>