結果
問題 | No.721 Die tertia (ディエ・テルツィア) |
ユーザー |
![]() |
提出日時 | 2020-03-13 12:08:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 1,551 ms |
コンパイル使用メモリ | 165,928 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 20:38:12 |
合計ジャッジ時間 | 2,342 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }