結果
問題 |
No.3152 neither multiple of A nor B
|
ユーザー |
![]() |
提出日時 | 2025-05-20 22:21:48 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 181 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 24,320 KB |
実行使用メモリ | 16,068 KB |
最終ジャッジ日時 | 2025-05-20 22:21:53 |
合計ジャッジ時間 | 4,586 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 19 TLE * 1 -- * 20 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%d %d %d",&N,&A,&B); | ^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(){ int N,A,B,count=0; scanf("%d %d %d",&N,&A,&B); for(int i=1;i<=N;i++){ if((i%A!=0)&&(i%B!=0)){ count++; } } printf("%d",count); return 0; }