結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-07 04:16:15 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 367 bytes |
| 記録 | |
| コンパイル時間 | 510 ms |
| コンパイル使用メモリ | 72,832 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-04 10:01:21 |
| 合計ジャッジ時間 | 986 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:6:9: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized]
6 | int 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;
}