結果
| 問題 |
No.857 素振り
|
| コンテスト | |
| ユーザー |
toto
|
| 提出日時 | 2025-04-01 13:47:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 298 bytes |
| コンパイル時間 | 457 ms |
| コンパイル使用メモリ | 27,776 KB |
| 実行使用メモリ | 15,940 KB |
| 最終ジャッジ日時 | 2025-04-01 13:47:18 |
| 合計ジャッジ時間 | 3,051 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 TLE * 1 -- * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:16: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int’ [-Wformat=]
15 | printf("%lld",count);
| ~~~^ ~~~~~
| | |
| | int
| long long int
| %d
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);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
long long holiday1, holiday2, all;
scanf("%lld%lld%lld",&holiday1,&holiday2,&all);
int i = 1;
int count = 0;
while(i <= all){
if(holiday1 != i && holiday2 != i){
count++;
}
i++;
}
printf("%lld",count);
}
toto