結果
問題 |
No.1934 Four Fruits
|
ユーザー |
|
提出日時 | 2025-09-08 17:36:40 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 3,712 ms |
コンパイル使用メモリ | 275,060 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-09-08 17:37:09 |
合計ジャッジ時間 | 4,743 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include <bits/stdc++.h> [[nodiscard]] static inline constexpr char solve(const char a, const char b, const char c) noexcept { if (a == b) return c; else if (a == c) return b; else if (b == c) return a; else return (('0' + '1' + '2' + '3') - (a + b + c)); } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); char a, b, c; std::cin >> a >> b >> c; std::cout << solve(a, b, c) << '\n'; return 0; }