結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー Ronlynes
提出日時 2017-01-28 23:29:41
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 485 ms
コンパイル使用メモリ 56,160 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 21:32:30
合計ジャッジ時間 1,350 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

int main() {
	long long x, cnt=0, ans, remain;
	cin >> x;
	cnt = x / 2;
	remain = x % 2;
	if(remain == 0){
		ans = cnt;
	}else{
		ans = cnt + 1;
	}
	cout << ans << endl;
	return 0;
}
0