よじろめ覚書

私の理解度重視のソースコードです。

2019-06-15から1日間の記事一覧

ABC023B - 手芸王

ABC

問題:B - 手芸王 #include <cstdio> #include <iostream> #include <string> using namespace std; int main(void) { int n, ans = -1; string s, str = "b"; scanf ("%d", &n); cin >> s; if (s == str) { ans = 0; } else { int k = 1; while (n >= str.length()) { if (k % 3 == 0)</string></iostream></cstdio>…