結果
| 問題 |
No.780 オフ会
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-19 01:19:00 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 638 bytes |
| コンパイル時間 | 711 ms |
| コンパイル使用メモリ | 107,680 KB |
| 実行使用メモリ | 27,928 KB |
| 最終ジャッジ日時 | 2024-07-07 06:19:52 |
| 合計ジャッジ時間 | 1,984 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 22 |
コンパイルメッセージ
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 = females - males;
notPair = (males - females) - 1;
if (notPair >= 1)
{
Console.WriteLine("YES");
Console.WriteLine(Math.Abs(notPair));
}
else
{
Console.WriteLine("NO");
Console.WriteLine(Math.Abs(notPair));
}
}
}