結果
| 問題 | No.780 オフ会 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-19 01:12:45 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 612 bytes |
| 記録 | |
| コンパイル時間 | 487 ms |
| コンパイル使用メモリ | 112,060 KB |
| 実行使用メモリ | 27,036 KB |
| 最終ジャッジ日時 | 2026-03-28 21:14:39 |
| 合計ジャッジ時間 | 2,164 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
class Program
{
static void Main(string[] args)
{
// 人数を読み込み
var input = Console.ReadLine().Split(' ');
int males = int.Parse(input[0]);
int females = int.Parse(input[1]);
// ペアになれなかった人数
int notPair = 0;
notPair = Math.Abs((males - females)+1);
if (notPair == 0)
{
Console.WriteLine("YES");
Console.WriteLine(notPair);
}
else
{
Console.WriteLine("NO");
Console.WriteLine(notPair);
}
}
}