結果

問題 No.531 エヌスクミ島の平和協定
ユーザー kyabaria
提出日時 2018-09-11 22:34:32
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 1,399 ms
コンパイル使用メモリ 157,636 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 08:31:50
合計ジャッジ時間 2,597 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 31 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
typedef long long ll;
#define INF 1000000000
#define MOD 1000000007
using namespace std;
int main(void){
    int n,m,ans;
    cin>>n>>m;
    if(n<=m){
        ans=1;
    }else{
        if(n%m==0){
            ans=n/m;
        }else{
            ans=-1;
        }
    }
    cout<<ans<<endl;
}
0