結果

問題 No.80 四角形を描こう
ユーザー elphe
提出日時 2024-11-14 15:43:53
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 312 bytes
コンパイル時間 840 ms
コンパイル使用メモリ 66,076 KB
最終ジャッジ日時 2025-02-25 04:11:13
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdint>

using namespace std;

int main()
{
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	uint16_t D;
	cin >> D;

	if ((D & 2) == 0) cout << (static_cast<uint32_t>(D >> 2) * (D >> 2)) << '\n';
	else cout << static_cast<uint32_t>(D >> 2) * ((D + 2) >> 2) << '\n';

	return 0;
}
0