結果
| 問題 |
No.80 四角形を描こう
|
| コンテスト | |
| ユーザー |
RCCW
|
| 提出日時 | 2017-02-19 21:28:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 407 bytes |
| コンパイル時間 | 3,422 ms |
| コンパイル使用メモリ | 157,276 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 05:18:48 |
| 合計ジャッジ時間 | 2,265 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 8 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
int n, k;
string s;
int main(){
int D=0;
cin>>D;
if(D<4){cout<<0<<endl;return 0;}
if(D%4==0){
cout<<(D/4)*(D/4)<<endl;
}else if(D%4==2){
cout<<(D/4)*(D/4+1)<<endl;
}else if(D%4==1){
cout<<(D/4)*(D/4)<<endl;
}else if(D%4==3){
cout<<(D/4)*(D/4+1)<<endl;
}
}
RCCW