結果
| 問題 |
No.721 Die tertia (ディエ・テルツィア)
|
| コンテスト | |
| ユーザー |
funakoshi
|
| 提出日時 | 2019-08-21 16:18:52 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,087 bytes |
| コンパイル時間 | 541 ms |
| コンパイル使用メモリ | 30,976 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 05:40:04 |
| 合計ジャッジ時間 | 988 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 2 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
int main(void)
{
int year,month,day;
scanf("%d/%d/%d",&year,&month,&day);
bool uruu=false;
if(year%4==0)
{
uruu=true;
if(year%100!=0&&year%400==0)
{
uruu=false;
}
}
day+=2;
if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
{
if(day>31)
{
day-=31;
month++;
}
if(month>12)
{
year++;
month=1;
}
}
else if (month==4||month==6||month==9||month==11)
{
if(day>30)
{
day-=30;
month++;
}
}
else
{
if(uruu==true)
{
if(day>29)
{
day-=29;
month++;
}
}
else
{
if(day>28)
{
day-=28;
month++;
}
}
}
printf("%d/%02d/%02d",year,month,day);
}
funakoshi