結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2016-06-22 14:54:34 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 382 bytes |
コンパイル時間 | 577 ms |
コンパイル使用メモリ | 58,456 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 21:37:18 |
合計ジャッジ時間 | 955 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include<iostream>#include<cmath>using namespace std;int main(){int days[12] = {31,28,31,30,31,30,31,31,30,31,30,31};int HAPPY_DAY = 0;for(int i = 0; i < 12; i++){for(int j = 0; j < days[i]; j++){int y1=(j+1)%10, y2=(j+1)/10;if(i+1 == y1+y2){HAPPY_DAY++;}}}cout << HAPPY_DAY << endl;return 0;}