結果
問題 |
No.188 HAPPY DAY
|
ユーザー |
![]() |
提出日時 | 2015-10-11 17:10:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 257 bytes |
コンパイル時間 | 2,077 ms |
コンパイル使用メモリ | 157,556 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 20:41:53 |
合計ジャッジ時間 | 2,551 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:23: warning: iteration 11 invokes undefined behavior [-Waggressive-loop-optimizations] 10 | for(int j=1;j<=a[i];j++) | ~~~^ main.cpp:9:16: note: within this loop 9 | for(int i=1;i<13;i++) | ~^~~
ソースコード
#include<bits/stdc++.h> using namespace std; int a[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int main(){ int ans = 0; for(int i=1;i<13;i++) for(int j=1;j<=a[i];j++) if(i == (a[j]%10 + a[j]/10)) ans++; cout << ans << endl; }