for Smartphone

yoshiokatsuneoのブログ

この広告は、90日以上更新していないブログに表示しています。

2014-12-03

yukicoder No.82 市松模様

競技プログラミング yukicoder Ruby

No.82 市松模様 - yukicoder

[問題]

幅W、高さH、左上C("B" or "W")で、"B"と"W"の市松模様を書く。

 

[回答]

(w + h)%2==0 or 1で"B"又は"W"を出力。

Cが"B"か"W"で出力を反転。

 

[コード](Ruby)

https://paiza.io/projects/8cO8BE7P9BK9mOHEVVh5pA

 

 [感想]

左上が"B"か"W"かは、どちらかでもいいと思って一度WA(Wrong Answer)。

 

 

yoshiokatsuneo 2014-12-03 00:16

yukicoder No.82 市松模様
Bookmark this entry on Hatena::Bookmark
Tweet
Remove all ads
  • Read more
Write a comment
« yukicoder No.83 最大マッチング ARC(AtCoder Regular Contest) 030 C - 有… »
Profile
id:yoshiokatsuneo id:yoshiokatsuneo
Subscribed unsubscribe Subscribe Subscribe
Search
Links
  • Hatena Blog
  • ブログをはじめる
  • Weekly Hatena Blog
  • Hatena Blog Pro
Recent Entries
  • SRM645 Div1 Med ArmyTeleportation
  • SRM 645 Div1 Easy JanuszTheBusinessman
  • SRM642 Div1 Medium TaroCutting
  • SRM642 Div1 Easy WaitingForBus
  • AtCoder Beginner Contest(ABC) #016 D - 一刀両断
Archive

Start using Hatena Blog!

yoshiokatsuneo is using Hatena Blog. Would you like to try it too?

Start using Hatena Blog (Free)
What is Hatena Blog?
yoshiokatsuneoのブログ yoshiokatsuneoのブログ

Powered by Hatena Blog | ブログを報告する

Star added

Quote saved.

Login to quote this blog

Failed to save quote. Please try again later.

You cannot quote because this article is private.

Subscribed unsubscribe Subscribe Subscribe