0
0

【条件判定 1】郵便料金 (paizaランク C 相当) 他

Last updated at Posted at 2024-04-14

【条件判定 1】郵便料金

2024_04_08 【条件判定 1】郵便料金.JPG
特に複雑な考えはいらず、素直に条件分けして、コード記入で解ける問題。


【条件判定 2】視力検査

2024_04_08 【条件判定 2】視力検査 (1).JPG

2024_04_08 【条件判定 2】視力検査 (1).JPG

2024_04_08 【条件判定 2】視力検査 (2).JPG
2024_04_08 【条件判定 2】視力検査 (3).JPG

長いコードになってしまったけど、要は"OK"あるいは"NG"が先に2回出た時点で条件をスキップすればいいので、カウント用の変数を複数用意して、2重の条件によるやり方が解きやすかったです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0