結果
| 問題 | No.721 Die tertia (ディエ・テルツィア) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-19 05:01:46 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,123 bytes |
| 記録 | |
| コンパイル時間 | 2,131 ms |
| コンパイル使用メモリ | 243,168 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-19 05:01:55 |
| 合計ジャッジ時間 | 3,871 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
| 純コード判定待ち |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <string>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <list>
#include <stdexcept>
#include <functional>
#include <utility>
#include <iomanip>
#include <ctime>
#include <valarray>
#include <iostream>
#include <sstream>
#include <fstream>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
#define MEM(a,b) memset((a),(b),sizeof(a))
const LL INF = 1e9 + 7;
const int N = 2e5 + 10;
int days[2][14] =
{
{0,31,28,31,30,31,30,31,31,30,31,30,31},
{0,31,29,31,30,31,30,31,31,30,31,30,31},
};
bool isleap(int y)
{
if (y % 100 == 0) return y % 400 == 0;
else return y % 4 == 0;
}
int main()
{
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
int y, m, d;
scanf("%d/%d/%d", &y, &m, &d);
int cnt = 2;
while (cnt--)
{
int o = isleap(y);
d++;
if (d > days[o][m])
{
d = 1;
m++;
if (m > 12) m = 1, y++;
}
}
printf("%d/%02d/%02d\n", y, m, d);
return 0;
}