結果
| 問題 |
No.485 方程式のお勉強
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-19 18:48:30 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 229 bytes |
| コンパイル時間 | 519 ms |
| コンパイル使用メモリ | 28,672 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-02 23:52:37 |
| 合計ジャッジ時間 | 1,306 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d %d",&A,&B);
| ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <stdlib.h>
int main(){
//input
int A,B;
scanf("%d %d",&A,&B);
//output
if (abs(B)%abs(A) == 0){
printf("%d\n",B/A);
}else{
printf("NO\n");
}
return 0;
}