結果

問題 No.857 素振り
ユーザー toto
提出日時 2025-04-01 13:47:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 310 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 27,520 KB
実行使用メモリ 9,252 KB
最終ジャッジ日時 2025-04-01 13:47:44
合計ジャッジ時間 2,761 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 TLE * 1 -- * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%lld%lld%lld",&holiday1,&holiday2,&all);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
    long long holiday1, holiday2, all;
    scanf("%lld%lld%lld",&holiday1,&holiday2,&all);

    long long i = 1;
    long long count = 0;
    while(i <= all){
       if(holiday1 != i && holiday2 != i){
            count++;
       } 
       i++;
    }
    printf("%lld",count);
}
0