結果
| 問題 | No.920 あかあお |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-04 13:21:49 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 2,000 ms |
| コード長 | 721 bytes |
| 記録 | |
| コンパイル時間 | 7,434 ms |
| コンパイル使用メモリ | 171,048 KB |
| 実行使用メモリ | 188,164 KB |
| 最終ジャッジ日時 | 2025-12-04 13:21:58 |
| 合計ジャッジ時間 | 9,170 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (103 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program
{
static void Main(string[] args)
{
string[] input = Console.ReadLine()!.Split(' ');
int red = int.Parse(input[0]);
int blue = int.Parse(input[1]);
int white = int.Parse(input[2]);
if (red > blue)
{
int tmp = red;
red = blue;
blue = tmp;
}
int num = blue - red;
int ans = white - num;
if (num > white)
{
Console.WriteLine(red + white);
}
else if (red == 0 && white == 0 || blue == 0 && white == 0)
{
Console.WriteLine(0);
}
else
{
Console.WriteLine(ans / 2 + num + red);
}
}
}