結果
問題 |
No.80 四角形を描こう
|
ユーザー |
|
提出日時 | 2016-10-23 10:53:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 383 bytes |
コンパイル時間 | 471 ms |
コンパイル使用メモリ | 53,972 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 01:54:12 |
合計ジャッジ時間 | 1,224 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 |
ソースコード
#include <iostream> #include <cstdint> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int D; cin >> D; if (D & 1) { D = (D - 1) / 2; cout << ((D & 1) ? ((D >> 1) * ((D >> 1) + 1)) : ((D >> 1) * (D >> 1))) << endl; } else { D = D >> 1; cout << ((D & 1) ? ((D >> 1) * ((D >> 1) + 1)) : ((D >> 1) * (D >> 1))) << endl; } }