結果
| 問題 | 
                            No.1748 Parking Lot
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-11-20 14:48:48 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 402 bytes | 
| コンパイル時間 | 1,307 ms | 
| コンパイル使用メモリ | 166,800 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-11 15:56:12 | 
| 合計ジャッジ時間 | 2,004 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 22 | 
ソースコード
// ライブラリの読み込み
#include <bits/stdc++.h>
using namespace std;
// 型名の短縮
using ll = long long; // -2^63 ~ 2^63 = 9 * 10^18(int は -2^31 ~ 2^31 = 2 * 10^9)
int main() {
//	input_from_file("input.txt");
//	output_to_file("output.txt");
	ll n, k;
	cin >> n >> k;
	ll res;
	if (n == 1 || k == n - 1) {
		res = n;
	}
	else {
		res = n - 1;
	}
	cout << res << endl;
}