結果

問題 No.80 四角形を描こう
ユーザー krotonkroton
提出日時 2014-11-27 23:46:56
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 208 bytes
コンパイル時間 402 ms
コンパイル使用メモリ 50,452 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-01 22:27:33
合計ジャッジ時間 1,142 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
4,380 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:6: warning: ‘D’ is used uninitialized in this function [-Wuninitialized]
  int w = D / 4;
      ^

ソースコード

diff #

#include <iostream>
using namespace std;
 
int main(){
	int D;
	int w = D / 4;
	int m = D % 4;
 
	if(m >= 2){
		cout << w * (w + 1) << endl;
	} else {
		cout << w * w << endl;
	}
 
	return 0;
}
0