結果
| 問題 |
No.3152 neither multiple of A nor B
|
| コンテスト | |
| ユーザー |
ゆーてぃー
|
| 提出日時 | 2025-05-20 22:03:36 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 156 bytes |
| コンパイル時間 | 364 ms |
| コンパイル使用メモリ | 25,428 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-05-20 22:03:38 |
| 合計ジャッジ時間 | 1,374 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 40 |
コンパイルメッセージ
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++;
}
}
return 0;
}
ゆーてぃー