From 05abb87d5299bc4df199e6d94193ce0f63c7c3e5 Mon Sep 17 00:00:00 2001 From: Baoshuo Ren Date: Sat, 12 Mar 2022 20:10:06 +0800 Subject: [PATCH] A - Shampoo https://atcoder.jp/contests/abc243/submissions/30034278 --- AtCoder/ABC243/A/A.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 AtCoder/ABC243/A/A.cpp diff --git a/AtCoder/ABC243/A/A.cpp b/AtCoder/ABC243/A/A.cpp new file mode 100644 index 00000000..171fac66 --- /dev/null +++ b/AtCoder/ABC243/A/A.cpp @@ -0,0 +1,21 @@ +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +int v, a, b, c; + +int main() { + std::ios::sync_with_stdio(false); + cin >> v >> a >> b >> c; + v %= a + b + c; + if (v < a) { + cout << "F" << endl; + } else if (v < a + b) { + cout << "M" << endl; + } else { + cout << "T" << endl; + } + return 0; +}