柴歌是一首三行诗,其音节数分别为5/7/5。
一首柴歌-w是一首诗,有三行,分别有5/7/5字数.
编写一个程序,如果输入是haiku-w,返回true,如果输入不是,则返回false。
有效的haiku-w输入必须由3行组成,用换行符分隔.
The man in the suit
is the same man from the store.
He is a cool guy.结果:真
Whitecaps on the bay:
A broken signboard banging
In the April wind.结果:假
1和0 )是可以接受的。发布于 2017-01-29 11:33:17
发布于 2017-01-29 10:25:41
@echo off
call:c&&call:c 2||exit/b
:c
set/an=%1+5
set/ps=
for %%W in (%s%)do set/an-=1
exit/b%n%当读取错误数错误数错误的一行时,退出具有非零错误级别。
发布于 2017-01-29 18:13:37
qj464T/R;一种程序,它接受"quoted strings"列表的输入,并酌情打印True或False。
测试套件
qj464T/R; Program. Input: Q
qj464T/R;Q Implicit variable fill
T Are the base-10
j digits
464 of 464
q equal
/ to the number
; of spaces
R in each string
Q in the input?
Implicitly printhttps://codegolf.stackexchange.com/questions/108508
复制相似问题