結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2017-06-22 09:45:59 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 1,000 ms |
コード長 | 456 bytes |
コンパイル時間 | 1,236 ms |
コンパイル使用メモリ | 158,528 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 01:43:26 |
合計ジャッジ時間 | 1,783 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(int argc, char **argv) {struct tm t;t.tm_year = 115;t.tm_mon = 0;t.tm_mday = 1;t.tm_hour = 0;t.tm_min = 0;t.tm_sec = 0;int sum = 0;for (int i = 0; i < 365; i++) {time_t mt = mktime(&t);if (t.tm_mon + 1 == (t.tm_mday / 10 + t.tm_mday % 10)) {//printf("month = %d, day = %d\n", t.tm_mon + 1, t.tm_mday);sum++;}t.tm_mday++;}printf("%d\n", sum);return 0;}