結果
| 問題 |
No.91 赤、緑、青の石
|
| ユーザー |
bluemegane
|
| 提出日時 | 2018-10-03 19:41:14 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 685 bytes |
| コンパイル時間 | 3,860 ms |
| コンパイル使用メモリ | 103,680 KB |
| 実行使用メモリ | 22,912 KB |
| 最終ジャッジ日時 | 2024-10-12 10:26:09 |
| 合計ジャッジ時間 | 6,990 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 WA * 6 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System.Linq;
using System;
public class Hello
{
public static void Main()
{
string[] line = Console.ReadLine().Trim().Split(' ');
var a = Array.ConvertAll(line, int.Parse);
var amin = a.Min();
var ans = amin;
for (int i = 0; i < 3; i++) a[i] -= amin;
Array.Sort(a);
ans += getAns(a);
Console.WriteLine(ans);
}
public static int getAns (int[] a)
{
var ans = 0;
while (true)
{
if (a[2] - 3 < 0) return ans;
a[2] -= 3;
if (a[1] - 1 < 0) return ans;
a[1] -= 1;
ans++;
Array.Sort(a);
}
}
}
bluemegane