åé¡æããããããæ¸ãæ¹ããã¦ãããã©ããè¦ããã«ãããããã¨ï¼ãã¨ããè¨ãæããã§ããã¨ããã
åé¡æ¦è¦
æå .
, @
ãããªãé·ã ã®æåå ãä¸ããããã@
ãå·¦ããé ã« åã ã .
ã«æ¸ãæããã
æ¸ãæãããã¨ã®æååã«å«ã¾ããæå .
ã®åæ°ãçããã
èãããã¨
ãå·¦ããé ã«ãã¨ããæå®ãå®ããããªå®è£ ããã¦ããããããã®å¿ è¦ã¯ãªããåã«
- ã«å«ã¾ãã
.
ã®åæ°ãæ±ãã - ããã« ã足ã
ã¨ããã ãã§ããã
ã³ã¼ã
#include <bits/stdc++.h> using namespace std; int main() { int N, D; string S; cin >> N >> D >> S; int res = 0; for (int i = 0; i < N; i++) { if (S[i] == '.') res++; } cout << res + D << endl; }