結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー Maeda
提出日時 2025-03-11 15:06:24
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 291 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 24,320 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-11 15:06:26
合計ジャッジ時間 1,442 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other WA * 18
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%d/%d/%d",&year,&month,&date);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
void main(void){
    
    int year,month,date;
    scanf("%d/%d/%d",&year,&month,&date);
    date += 2;
    if(date == 31){
        date = 1;
        month++;
    }
    if(month == 13){
        month = 1;
        year++;
    }
    printf("%d/%02d/%02d",year,month,date);
}
0