結果
| 問題 |
No.920 あかあお
|
| コンテスト | |
| ユーザー |
Shed0428
|
| 提出日時 | 2019-12-22 13:40:49 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 691 bytes |
| コンパイル時間 | 766 ms |
| コンパイル使用メモリ | 107,600 KB |
| 実行使用メモリ | 26,076 KB |
| 最終ジャッジ日時 | 2024-09-14 05:13:46 |
| 合計ジャッジ時間 | 1,744 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Hello{
public static void Main(){
string[] list = Console.ReadLine().Trim().Split(' ');
int red = int.Parse(list[0]);
int blue = int.Parse(list[1]);
int white = int.Parse(list[2]);
if((red - blue)>white){
Console.WriteLine(blue + white);
}else if((blue - red)>white){
Console.WriteLine(red + white);
}else if(red>blue){
white -=red-blue;
Console.WriteLine(red + white/2);
}else if(blue>red){
white -=blue-red;
Console.WriteLine(blue + white/2);
}else{
Console.WriteLine(red + white/2);
}
}
}
Shed0428