結果
問題 | No.80 四角形を描こう |
ユーザー |
|
提出日時 | 2018-05-03 17:04:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 274 bytes |
コンパイル時間 | 466 ms |
コンパイル使用メモリ | 64,144 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-28 00:44:07 |
合計ジャッジ時間 | 1,140 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 |
ソースコード
#include<iostream> using namespace std; int main(){ int d; cin >> d; if(d%2 == 1) d--; if(d%4 == 0){ cout << d*d/16 << endl; }else if(d%2 == 0){ cout << (d*d-4)/16 << endl; }else{ cout << 0 << endl; } return 0; }