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