結果
問題 | No.188 HAPPY DAY |
ユーザー |
![]() |
提出日時 | 2016-01-13 18:15:57 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 606 bytes |
コンパイル時間 | 653 ms |
コンパイル使用メモリ | 63,856 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-12-30 20:59:59 |
合計ジャッジ時間 | 1,075 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <iostream>#include <vector>#include <cmath>#include <algorithm>using namespace std;int main(){int x, y, day;int cnt = 0;for (int x = 1; x <= 12; x++) {switch (x) {case 1:case 3:case 5:case 7:case 8:case 10:case 12:day = 31;break;case 2:day = 28;break;case 4:case 6:case 9:case 11:day = 30;break;default:return 1;}for (int y = 1; y <= day; y++) {if (x == (y / 10 + y % 10)) {// cout << x << "月" << y << "日" << endl;cnt++;}}}cout << cnt << endl;return 0;}