結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2016-06-07 04:16:15 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 367 bytes |
コンパイル時間 | 587 ms |
コンパイル使用メモリ | 54,748 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 21:36:43 |
合計ジャッジ時間 | 971 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:14:20: warning: ‘cnt’ may be used uninitialized in this function [-Wmaybe-uninitialized] 14 | cnt++; | ~~~^~
ソースコード
#include <iostream> int main(){ int a,b,c; int m[] = {31,29,31,30,31,30,31,31,30,31,30,31}; int cnt; for(int i=0;i<12;i++){ for(int j=1;j<m[i]+1;j++){ a = j / 10; b = j % 10; c = a + b; if(c==(i+1)){ cnt++; } } } std::cout << cnt << std::endl; }