結果
問題 | No.188 HAPPY DAY |
ユーザー |
![]() |
提出日時 | 2016-08-04 23:12:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 409 bytes |
コンパイル時間 | 617 ms |
コンパイル使用メモリ | 56,132 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 01:00:09 |
合計ジャッジ時間 | 829 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <iostream> using namespace std; int main() { int month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; int mon; int x, y,sum; int ans = 0; for (mon = 0; mon < 12; mon++) { for (x = 0; x <= month[mon]/10; x++) { for (y = 0; y < 10; y++) { if (month[mon]/10 == x && y > month[mon]%10) { break; } if (mon + 1 == x + y) { ans++; } } } } cout << ans << endl; }