結果
問題 |
No.485 方程式のお勉強
|
ユーザー |
|
提出日時 | 2017-02-24 22:37:12 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 242 bytes |
コンパイル時間 | 599 ms |
コンパイル使用メモリ | 55,800 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-01-02 23:06:19 |
合計ジャッジ時間 | 1,381 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 6 WA * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:8:11: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%lld %lld",&a,&b); | ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include<iostream> using namespace std; #include<cstdio> #include<cstring> typedef long long ll; ll a,b,ans; int main(){ scanf("%lld %lld",&a,&b); if(b%a==0){ printf("%lld",b/a); }else printf("-1"); return 0; }