6 kyu
T.T.T.31: Chinese poetry and calligraphy(中国诗词与书法)
Loading description...
Puzzles
Games
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
@myjinxin2015可谓是编程界中的诗仙啊 ~~
Unicode has
ideographic space
character, U+3000, here: " ", it has the same width as CJK characters (although it looks thin here in Codewars in my Firefox with whatever font it is).Thanks for the knowledge. I never noticed that there exists a wide range of Unicode Whitespaces (https://en.wikipedia.org/wiki/Whitespace_character#Unicode) However
U+3000
also looks thinner in my sublime (w/ Source Code Pro font). Where can I look for the width information?I've checked font coverage for U+3000 by BabelMap and it turns out this character is absent from pretty much all widely used European fonts excluding
Arial Unicode MS
. I think I installed some CJK font pack at some point and, besides,Code2000
andunifont
. The latter two are always nice to have in case you come across some rare characters on the net.I think to use two spaces is more easier than U300. In fact, I've use this(full-width space) in some of My other katas.
Surely next time i'm ready to travel to China;-)... Good one, not as good as "Mr. smile67", but good:-)...
Don't expect me to release the complex Kata every time, I will also release some 8kyu kata (or 9 kyu 10 kyu...), you will soon find them ;-)
Two days ago to see a news, a Chinese tourists traveling in Germany, stay in the refugee camp for a few days, and received the relief money. I think, Germany is really so nice and so funny, I also want to go to germany ;-)
9/10kyu? Are you able to produce such easy katas, i'm not sure;-)? But i think you have enough good katas to publish some easy ones too. If i solve your "In's and Out's" next time(??!;-)) i will vote it 1kyu;-)! Germany is nice? Surely it has a good social system and some good conditions, so this and some other things are nice;-)... But the really friendly people live in Asia (i think), always smiling, friendly, and moderate often poor but rich inside... with exceptions as always, but nothing is perfect on earth;-)!
I enjoyed this very much, but had to figure out the space problem for myself. It might be helpful to explain that the space that is both encountered in the input and required in the output might be different than the space produced by the keyboard.
Otherwise, very enjoyable!
You should remove the spaces in the input string, only leave the Chinese characters. the output is an array, sometimes the array is not just all of the grid are used, the grid which unused need to fill two spaces to maintain the shape of whole.
I don't know whether my answer is helpful, because in fact, I do not fully understand your English (please forgive my bad English) ;-)
Your English is fine! I admire everyone on Codewars for how well they communicate in English, even when it's not their native language.
Your answer is helpful. Now I understand better. What I thought was some kind of larger space character is actually two spaces. Fortunately my solution was still handling it successfully, despite my confusion. As you can see, my solution does remove the spaces from the input and then puts them back in the output when I "run out" of Chinese characters to insert. So everything's good :-)
Normally one Chinese character (Double-Byte Set) occupies twice the width of one ASCII character. So please hit your space-bar twice in this kata wherever it needs. Yes, I agree that this
hint
should be included in the description. @myjinxin2015 How do you think? ;)I will add it soon.
Thank you to both of you!
It's not that obvious for our native speakers to notice it. So thank you as well for pointing it out!
Glad to post the first user solution! I enjoy this Chinese Kata very much :) Thank you! IMHO, it might be better to center the first calligraphy image to align with its poem text; And you could just leave one example (plus a wikipedia link or something alike) instead of two to make the whole description less lengthy.
Because of the use of the markdown, did not notice that the picture is not in the middle, thank you for your feedback. Now that it has been corrected.
According to your advice, I removed the longer poem and add two link of
Chinese poetry
andChinese calligraphy
. ;-)