結果
問題 |
No.2781 A%B問題
|
ユーザー |
|
提出日時 | 2024-06-30 19:50:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 3,456 ms |
コンパイル使用メモリ | 250,048 KB |
最終ジャッジ日時 | 2025-02-22 01:38:54 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using ll = long long; ll a,b; void solve(){ int c = a%b; if(c < 0) c += abs(b); cout<<c<<endl; } signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cin >> a >> b; solve(); }