結果
問題 | No.188 HAPPY DAY |
ユーザー |
![]() |
提出日時 | 2019-05-17 09:41:48 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 577 bytes |
コンパイル時間 | 781 ms |
コンパイル使用メモリ | 63,576 KB |
実行使用メモリ | 6,812 KB |
最終ジャッジ日時 | 2024-09-17 05:49:50 |
合計ジャッジ時間 | 881 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <iostream>#include <string>#include <vector>#include <algorithm>#include <cmath>using namespace std;using ll = long long;int main(){int ans = 0;for (int i = 1; i <= 12; i++){int day = 0;switch (i){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:break;}for (int j = 1; j < day + 1; j++){if (j % 10 + floor(j / 10) == i){ans++;}}}cout << ans << endl;}