結果
問題 | No.998 Four Integers |
ユーザー |
![]() |
提出日時 | 2020-02-28 21:34:42 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 1,000 ms |
コード長 | 548 bytes |
コンパイル時間 | 837 ms |
コンパイル使用メモリ | 102,784 KB |
実行使用メモリ | 18,048 KB |
最終ジャッジ日時 | 2024-11-30 23:04:19 |
合計ジャッジ時間 | 2,343 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace a { class a { static void Main(string[] args) { var ss = Console.ReadLine().Split(); int[] a = { int.Parse(ss[0]) , int.Parse(ss[1]) , int.Parse(ss[2]) , int.Parse(ss[3]) }; Array.Sort(a); for (int i = 1; i < 4; i++) { if (a[i] != a[i - 1] + 1) { Console.WriteLine("No"); return; } } Console.WriteLine("Yes"); } } }