結果

問題 No.1893 Cycle
ユーザー sorag
提出日時 2022-07-19 15:33:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 62,720 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-01 18:32:30
合計ジャッジ時間 1,342 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int main() {
	int x, y, z,k;
	cin >> x >> y;
	z = max(x, y);
	k = min(x, y);
	if (z < 8) cout << z + 4 << endl;
	else if(z>=8 and k>z-8) cout << z-8 << endl;
	else cout << k+4 << endl;

	return 0;
}

0