結果
問題 |
No.91 赤、緑、青の石
|
ユーザー |
|
提出日時 | 2023-08-01 09:00:49 |
言語 | C# (.NET 8.0.404) |
結果 |
TLE
|
実行時間 | - |
コード長 | 781 bytes |
コンパイル時間 | 15,016 ms |
コンパイル使用メモリ | 166,180 KB |
実行使用メモリ | 254,360 KB |
最終ジャッジ日時 | 2024-10-11 01:04:05 |
合計ジャッジ時間 | 27,628 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | TLE * 1 -- * 27 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (98 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; using System.Collections.Generic; using System.Linq; namespace yukicoder { public class Program { public static void Main() { var s = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); var sum = 0; sum = Make(s, sum); Console.WriteLine(sum); } public static int Make(int[] s,int sum) { while (s.All(x => x > 0)) { s = s.Select(x => x - 1).ToArray(); sum++; } if (!s.All(x => x < 3)) { Array.Sort(s); s = new int[3] { 1, s[1], s[2] - 2 }; sum = Make(s, sum); } return sum; } } }