結果

問題 No.188 HAPPY DAY
コンテスト
ユーザー A63295
提出日時 2015-12-18 13:37:40
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 311 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 44 ms
コンパイル使用メモリ 29,952 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-24 05:24:00
合計ジャッジ時間 770 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:25: warning: iteration 12 invokes undefined behavior [-Waggressive-loop-optimizations]
    8 |        for( j = 1; j < m[i] + 1; j++){
      |                        ~^~~
main.c:7:19: note: within this loop
    7 |    for ( i = 0; i < 13; i++){
      |                 ~~^~~~

ソースコード

diff #
raw source code

#include <stdio.h>
int main(void){
int i, j, c;
int m [] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

   c = 0;
   for ( i = 0; i < 13; i++){
       for( j = 1; j < m[i] + 1; j++){
           if ( i == j / 10 + j % 10){
               c++;
           }
       }
   }
   printf("%d\n",c);
   return 0;
}
0