結果

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

ソースコード

diff #

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

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