Official
A - illegal Editorial
by
A - illegal Editorial
by
harurun4635
プログラミングの学習を始めたばかりで何から手をつけるべきかわからない方は、まずは practice contest の問題A「Welcome to AtCoder」をお試しください。言語ごとに解答例が掲載されています。 また、プログラミングコンテストの問題に慣れていない方は、 AtCoder Beginners Selection の問題をいくつか試すことをおすすめします。
長さが \(5\) の倍数である文字列かどうかを判定すればよいです。例えば以下のように実装できます。
Python の実装例
s = input()
print("Yes" if len(s) % 5 == 0 else "No")
C++ の実装例
#include <bits/stdc++.h>
using namespace std;
int main(){
string s; cin >> s;
cout << (s.size() % 5 == 0 ? "Yes" : "No") << endl;
}
posted:
last update:
