Log inSign up
Problems / B001

Printer check phrase

100 ptsCases 1Set by dongbinna
Added October 30.
2 solved2 attempted2 submissionssolvers took 1.0 tries on average

Statement

A workshop uses several label printers. When a new machine arrives, it is not put to work right away. It is checked first. The staff want to see several things at once, whether the ink has caught properly, whether the characters are pushed out of line, whether uppercase and lowercase letters come out as different characters, and whether spaces and symbols are dropped.

So the workshop has settled on one check phrase. It mixes uppercase and lowercase letters, it holds a single space in the middle, and it ends with a symbol. If this one line comes out correctly down to the last character, the machine goes into work. The check phrase does not change from machine to machine. It is always the same.

What the single phrase lets you check is shown in the following table.

What is checkedWhere to look in the phrase
Whether uppercase and lowercase are told apartThe two words that start with a capital letter
Whether a space is droppedThe single space between the two words
Whether symbols printThe exclamation mark at the end of the phrase
Whether characters are pushed out of lineWhether all twelve slots fit on one line

Write a program that prints the check phrase on one line.

For example, suppose the check phrase is written out one character per slot as in the following table. The slots are numbered from 1, and slot 6 holds a single space.

Slot123456789101112
CharacterHellospaceWorld!

Slot 1 and slot 7 are uppercase, and every other letter slot is lowercase. Slot 12 is an exclamation mark. Joining the twelve slots together and printing them as one line gives the following table.

LineWhat has to be printed
First lineHello World!

Only one space goes in slot 6, and it must not become two. No other character and no extra space may be attached in front of the phrase or behind it. This problem has no input, so the content to print is the same single line of the table above in every case.

Input and output examples

Example 1

Input

Output

Hello World!

Input

  • No input is given for this problem. Standard input holds 0 lines, so you only have to print, with no part that reads input. Even if you try to read input, there is nothing there to read. Nothing in the answer depends on input, and the phrase to print is fixed to one phrase in every case. Put another way, the twelve slots of the table in the statement are given in place of input, and the number of lines to print is 1 line in every case. Values such as the number of machines or the number of checks are not given either.

Output

  • Print the check phrase on the first line. The phrase to print is Hello World! and you print this one line and then break the line. Print the uppercase and lowercase letters exactly as the table in the statement has them, and put only one space between the two words. Print the exclamation mark at the end as well, and do not attach a space after the exclamation mark. Print nothing on the second line.

Requirements

  • Do not read any input
  • Print the uppercase and lowercase letters exactly as the table in the statement has them
  • There is one space between the two words
  • Print the exclamation mark at the end, and do not attach a space after it
  • The output is one line, and nothing is printed on the second line
  • You must write a program that reads from standard input and writes to standard output
  • Trailing spaces at the end of a line and blank lines at the end of the output are ignored when grading
  • The languages you can use are Python and JavaScript
  • The memory limit is 256MB. The browser does not measure it, it only states it
  • The time limit is set by measuring the setter's reference solution on the same runtime
  • On this problem you submit code, not a prompt. That code runs in the browser on this device, and all that goes to the server is a fingerprint of the output and the time it took. Whether it is correct is decided by the server. The run time is a number each device reports, so the code and the device details are posted next to it on the leaderboard.
  • The output has to match the expected value down to the character. A space inside a line counts the same as any other character.
  • There are 1 cases, and 1 of them show the input together with the expected output. The rest are used only when you submit and are not shown on this page.
  • You have to pass all 1 cases to solve this.
Read the requirements carefully before solving. Tampering with the grading to make a submission look like a pass can get you sanctioned if caught. The code you submit is published on the leaderboard along with the result.

Examples

1 public cases. Judging also uses hidden cases. You have to pass all 1 cases to solve this.

Input
Expected output
Hello World!

Solution

Your code runs on this device. Only the fingerprint of the output and the elapsed time go to the server. The server decides whether it is correct.

0 chars1 lineMemory 256MB (recorded only)Reference 2.0ms

Submitting requires you to log in. Running against the public cases works without one.

You can test with 1 public cases. Submitting runs the hidden cases too.

People who solved this problem

The time shown is the time spent solving. Input reading time is outside the solver's control, so it is excluded. And since each device reports this value itself, we record which device measured it.

1ostenhun1ms22 charsPythonWindows NT 10.0 / Chrome/154.0.0.0 / 12코어 / 32GB

Log in and you can see the code once you solve this problem.

2bampal22ms22 charsPythonWindows NT 10.0 / Chrome/156.0.0.0 / 8코어 / 16GB

Log in and you can see the code once you solve this problem.