結果
| 問題 | 
                            No.333 門松列を数え上げ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             nyakagawan
                         | 
                    
| 提出日時 | 2016-01-24 11:48:13 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 559 bytes | 
| コンパイル時間 | 474 ms | 
| コンパイル使用メモリ | 60,012 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-21 15:09:28 | 
| 合計ジャッジ時間 | 954 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 7 | 
ソースコード
// No333.cpp : Defines the entry point for the console application.
//
#include <assert.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <climits>
using namespace std;
typedef unsigned char uchar;
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
#define NMAX 2000000000
int main()
{
	int A, B;
	cin >> A >> B;
	int ans = 0;
	if (A > B) {
		ans = NMAX - B - 1;
	}
	else {
		ans += B - 2;
	}
	cout << ans << endl;
    return 0;
}
            
            
            
        
            
nyakagawan