Print Sentence and Word


Submit solution

Points: 10 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type
Allowed languages
Java 19, Java 8

題目說明

輸入兩段文字,第一段原樣輸出,第二段只輸出第一個單詞。

輸入

  1. 第一行輸入一段文字

  2. 第二行輸入一段文字

輸出

  1. 第一行輸出一段文字

  2. 第二行輸出一段文字的第一個單詞

sample input1

I love learning Java
Java

sample output1

I love learning Java
I

sample input2

Hello world
Hello world

sample output2

Hello world
Hello

Comments

There are no comments at the moment.