結果
| 問題 | No.721 Die tertia (ディエ・テルツィア) |
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2020-03-13 12:08:16 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 415 bytes |
| 記録 | |
| コンパイル時間 | 1,026 ms |
| コンパイル使用メモリ | 179,680 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-16 00:20:28 |
| 合計ジャッジ時間 | 2,123 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
string S;
cin >> S;
int y, m, d;
sscanf( S.c_str(), "%d/%d/%d", &y, &m, &d );
struct tm tm = { 0, 0, 0, d, m - 1, y - 1900 };
time_t time = mktime( &tm ) + 60 * 60 * 24 * 2;
struct tm *ltime = localtime( &time );
char ans[16];
sprintf( ans, "%04d/%02d/%02d", ltime->tm_year + 1900, ltime->tm_mon + 1, ltime->tm_mday );
cout << ans << endl;
}
forest3