Rainy Season
Problem LinkSolution by JAPAMISTERIOSO — 100 pts
Code / Notes
// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
using namespace std;
int main() {
string x;
cin >> x;
if (x == "SSS"){
cout << 0;
}if (x == "SSR"){
cout << 1;
}if (x == "SRS"){
cout << 1;
}if (x == "RSS"){
cout << 1;
}if (x =="RSR"){
cout << 1;
}if (x == "RRS"){
cout << 2;
}if (x == "SRR"){
cout << 2;
}if (x == "RRR"){
cout << 3;
}
}
Last updated 3 weeks, 3 days ago