結果

問題 No.188 HAPPY DAY
ユーザー ShimizudesShimizudes
提出日時 2018-07-06 22:16:13
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 1,041 ms
コンパイル使用メモリ 50,888 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-13 18:18:39
合計ジャッジ時間 921 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:9: warning: ‘sum’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     sum += 1;
     ~~~~^~~~

ソースコード

diff #

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(void) {
	int sum;
	for(int i=1; i<=12; i++)
	{
		for(int j=1; j<=30; j++)
		{
			if(i == j/10 + j%10)
			{
				sum += 1;
			}
			
			else
			{
				sum += 0;
			}
		}
	}
	cout<<sum<<endl;
	return 0;
}
0