2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

0.はじめに

 調子が上がらないと言うか、最近はコンテスト以外では
 競プロの練習とかしてないので、実力上がらないのは当然か・・・。
 と、おもいつつ参戦。
 A~Cはなんとか正解するも、D以降はお手上げ。
 レートは703のまま変わらずでした。

1. A - Approximation

 なんとなくややこしい問題。
 整数以外を扱うのは緊張します。

 とはいえ、A÷Bの答え(小数点あり)が、
 A÷Bの少数第一位を切り捨てたものと
 それに1を加えたもののどちらに近いかという話なので
 そのまま実装しACでした。

 https://atcoder.jp/contests/abc407/submissions/66086437

2.B - P(X or Y)

 こちらも少数蟻の問題。
 まぁ単純に、1~6の2重ループを作り、条件に合うケースをカウントし
 最後に36で割って出力でACでした。

 https://atcoder.jp/contests/abc407/submissions/66092677

3.C - Security 2

 昔のアーケードゲームのハイスコアのアルファベット3桁名前入力っぽいなと思いつつ。
 【考え方】
  まずAはSの文字数分入力
  その後右の桁から見ていき
  桁ごとに何回押せば最終的にSの文字と同じになるかを加算していく。
  例) 407の場合
   Aは3回
   3桁目の7はAを7回
   2桁目の0は3桁目でAを7回押すので、7回押したら0になる数=3回
   1桁目の4は2、3桁目でAを10回押すので、10mod10回押したら4になる数=4回
   3+7+3+4=17回
 考え方に基づき実装してACとなりました。

 https://atcoder.jp/contests/abc407/submissions/66110956

以上

2
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?