結果
| 問題 |
No.1184 Hà Nội
|
| コンテスト | |
| ユーザー |
uw_yu1rabbit
|
| 提出日時 | 2020-08-22 15:23:19 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 662 bytes |
| コンパイル時間 | 3,658 ms |
| コンパイル使用メモリ | 89,216 KB |
| 最終ジャッジ日時 | 2025-01-13 09:31:27 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | WA * 27 |
ソースコード
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
using namespace std;
using i32 = int_fast32_t;
using i64 = int_fast64_t;
#define rep(i, n) for (i32 i = 0; i < (i32)(n); i++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
using P = pair<i64, i64>;
constexpr i64 MOD = 998244353;
int main() {
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
i64 n, l;
cin >> n >> l;
if(n == l){
cout << 1 << endl;
return 0;
}
i64 ans = n % l;
n -= n % l;
ans %= MOD;
ans += n / l * 2;
ans %= MOD;
cout << ans << endl;
}
uw_yu1rabbit