よじろめ覚書

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

2019-08-13から1日間の記事一覧

ABC053B - A to Z String

ABC

問題:B - A to Z String #include <iostream> #include <string> using namespace std; int main(void) { string s; cin.tie(0); ios::sync_with_stdio(false); cin >> s; cout << s.rfind('Z') - s.find('A') + 1 << "\n"; return 0; }</string></iostream>

ABC053A - ABC/ARC

ABC

問題:A - ABC/ARC #include <iostream> using namespace std; int main(void) { int x; cin.tie(0); ios::sync_with_stdio(false); cin >> x; cout << (x < 1200? "ABC" : "ARC") << "\n"; return 0; }</iostream>