結果
問題 |
No.3152 neither multiple of A nor B
|
ユーザー |
![]() |
提出日時 | 2025-05-20 22:24:17 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 194 bytes |
コンパイル時間 | 296 ms |
コンパイル使用メモリ | 24,960 KB |
実行使用メモリ | 17,480 KB |
最終ジャッジ日時 | 2025-05-20 22:24:24 |
合計ジャッジ時間 | 6,728 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 -- * 2 |
other | -- * 40 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:18: warning: format ‘%lf’ expects argument of type ‘double *’, but argument 2 has type ‘long int *’ [-Wformat=] 4 | scanf("%lf %lf %lf",&N,&A,&B); | ~~^ ~~ | | | | double * long int * | %ld main.c:4:22: warning: format ‘%lf’ expects argument of type ‘double *’, but argument 3 has type ‘long int *’ [-Wformat=] 4 | scanf("%lf %lf %lf",&N,&A,&B); | ~~^ ~~ | | | | double * long int * | %ld main.c:4:26: warning: format ‘%lf’ expects argument of type ‘double *’, but argument 4 has type ‘long int *’ [-Wformat=] 4 | scanf("%lf %lf %lf",&N,&A,&B); | ~~^ ~~ | | | | double * long int * | %ld main.c:10:18: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘long int’ [-Wformat=] 10 | printf("%f",count); | ~^ ~~~~~ | | | | | long int | double | %ld main.c:4:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%lf %lf %lf",&N,&A,&B); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(){ long int N,A,B,count=0; scanf("%lf %lf %lf",&N,&A,&B); for(long int i=1;i<=N;i++){ if((i%A!=0)&&(i%B!=0)){ count++; } } printf("%f",count); return 0; }