結果

問題 No.820 Power of Two
ユーザー aa
提出日時 2019-04-26 21:21:59
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 186 bytes
コンパイル時間 1,491 ms
コンパイル使用メモリ 164,268 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-16 12:49:44
合計ジャッジ時間 2,212 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: 関数 ‘void solve()’ 内:
main.cpp:8:25: 警告: ‘n’ is used uninitialized [-Wuninitialized]
    8 |         cout << max(0, n-k+1) << endl;
      |                        ~^~
main.cpp:7:13: 備考: ‘n’ はここで定義されています
    7 |         int n, k;
      |             ^
main.cpp:8:25: 警告: ‘k’ is used uninitialized [-Wuninitialized]
    8 |         cout << max(0, n-k+1) << endl;
      |                        ~^~
main.cpp:7:16: 備考: ‘k’ はここで定義されています
    7 |         int n, k;
      |                ^

ソースコード

diff #

#include "bits/stdc++.h"

using namespace std;

void solve(void)
{
	int n, k;
	cout << max(0, n-k+1) << endl;
}

int main()
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}
0