結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
![]() |
提出日時 | 2019-03-18 15:07:15 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 616 bytes |
コンパイル時間 | 905 ms |
コンパイル使用メモリ | 114,160 KB |
実行使用メモリ | 27,284 KB |
最終ジャッジ日時 | 2024-07-18 09:33:22 |
合計ジャッジ時間 | 2,006 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Linq;class Program{public void Solve(){int[] ABCD = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();int count = 0;foreach (var red in Enumerable.Range(ABCD[0], ABCD[1] - (ABCD[0] - 1))){foreach (var black in Enumerable.Range(ABCD[2], ABCD[3] - (ABCD[2] - 1))){if (red == black) { continue; }count++;}}Console.WriteLine(count);}static void Main(){var solver = new Program();solver.Solve();}}