結果

問題 No.80 四角形を描こう
ユーザー 0w1
提出日時 2016-11-20 21:05:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 257 bytes
コンパイル時間 1,903 ms
コンパイル使用メモリ 166,208 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-27 09:07:30
合計ジャッジ時間 2,490 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

signed main(){
  int D; cin >> D;
  if( D < 4 ) cout << 0 << endl, exit( 0 );
  D /= 2;
  int f = D / 2;
  if( D == 2 * f + 1 )
    cout << f * ( f + 1 ) << endl;
  else
    cout << f * f << endl;
  return 0;
}
0