結果
| 問題 | 
                            No.188 HAPPY DAY
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ko_ki_leo
                         | 
                    
| 提出日時 | 2015-10-11 17:15:51 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 305 bytes | 
| コンパイル時間 | 1,624 ms | 
| コンパイル使用メモリ | 157,668 KB | 
| 実行使用メモリ | 13,568 KB | 
| 最終ジャッジ日時 | 2024-12-30 20:42:20 | 
| 合計ジャッジ時間 | 5,971 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | TLE * 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 == (j%10 + j/10)){
	cout << i << " " << j << endl;
	ans++;
      }
    }
  }
  cout << ans << endl;
}
            
            
            
        
            
ko_ki_leo