結果

問題 No.780 オフ会
ユーザー TAKINBORI
提出日時 2019-01-21 19:09:31
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 53,564 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-15 13:14:07
合計ジャッジ時間 1,162 ms
ジャッジサーバーID
(参考情報)
judge6 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

int main()
{
    int A;
    int B;
    std::cin >> A;
    std::cin >> B;
    if(A < B)
    {
        std::cout << "YES" << std::endl << B - (A + 1);
    }
    else
    {
        std::cout << "NO" << std::endl << A - B + 1;
    }
    return 0;
}
0