結果
| 問題 |
No.188 HAPPY DAY
|
| コンテスト | |
| ユーザー |
fushigu
|
| 提出日時 | 2019-05-17 09:40:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 580 bytes |
| コンパイル時間 | 693 ms |
| コンパイル使用メモリ | 63,740 KB |
| 実行使用メモリ | 6,812 KB |
| 最終ジャッジ日時 | 2024-09-17 05:49:49 |
| 合計ジャッジ時間 | 962 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 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 = 0; i < 12; i++)
{
int day = 0;
switch (i + 1)
{
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;
}
fushigu