結果
| 問題 | 
                            No.857 素振り
                             | 
                    
| コンテスト | |
| ユーザー | 
                             dgd1724
                         | 
                    
| 提出日時 | 2019-09-25 06:54:27 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 319 bytes | 
| コンパイル時間 | 468 ms | 
| コンパイル使用メモリ | 57,092 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-21 07:58:00 | 
| 合計ジャッジ時間 | 1,078 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 8 | 
ソースコード
#include <fstream>
#include <iostream>
#include <utility>
int main() {
	//std::ifstream inf("Text.txt");	std::cin.rdbuf(inf.rdbuf());
	long long int X, Y, Z, ans;
	std::cin >> X >> Y >> Z;
	
	if (Z < X) {
		ans = Z;
	}
	else if (Z < Y) {
		ans = Z - 1;
	}
	else {
		ans = Z - 2;
	}
	std::cout << ans << std::endl;
}
            
            
            
        
            
dgd1724