結果
| 問題 | No.1934 Four Fruits |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-08 17:36:40 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 352µs | |
| コード長 | 430 bytes |
| 記録 | |
| コンパイル時間 | 2,035 ms |
| コンパイル使用メモリ | 328,096 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-14 22:53:17 |
| 合計ジャッジ時間 | 3,369 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}