結果

問題 No.1184 Hà Nội
ユーザー Sooh31
提出日時 2020-08-22 13:44:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 411 bytes
コンパイル時間 2,213 ms
コンパイル使用メモリ 191,044 KB
最終ジャッジ日時 2025-01-13 07:59:18
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
using ll = long long;
using graph = vector<vector<int>>;

const ll mod = 998244353;
const int INF = 1001001001;

int main(){
    ll n, k; cin >> n >> k;
    ll ans = 0;
    if(n <= k) ans = 1;
    else{
        ans = (n / k) % mod * 2 % mod;
        if(n%k != 0) ans++;
        else ans--;
    }
    cout << ans << endl;
}
0