提出 #654917
ソースコード 拡げる
#include <bits/stdc++.h>
#define FOR(i, a, b) for(int (i) = (a); (i) <= (b); ++(i))
#define rep(i, n) FOR(i, 0, n - 1)
#define rep1(i, n) FOR(i, 1, n)
#define rrep(i, n) for(int (i) = (n) - 1; (i) >= 0; --(i))
#define all(a) (a).begin(),(a).end()
#define PB push_back
using namespace std;
using ll = long long int;
using vb = vector<bool>;
using vi = vector<int>;
using vd = vector<double>;
using vll = vector<ll>;
using vvb = vector<vb>;
using vvi = vector<vi>;
using vvd = vector<vd>;
using vvll = vector<vll>;
using vvvi = vector<vvi>;
using vvvd = vector<vvd>;
// using P = pair<int, int>;
const int INF = 0x7fffffff;
// const ll INF = 0x3fffffffffffffff;
const ll divisor = 1000000007;
void mainmain(){
int A, B;
cin >> A >> B;
int ans = B - A;
if(A < 0 && B > 0) ans--;
cout << ans << endl;
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
// cout << fixed << setprecision(15);
mainmain();
return 0;
}
提出情報
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01.txt | AC | 24 ms | 800 KiB |
| 02.txt | AC | 26 ms | 800 KiB |
| 03.txt | AC | 26 ms | 800 KiB |
| 04.txt | AC | 24 ms | 800 KiB |
| 05.txt | AC | 26 ms | 932 KiB |
| 06.txt | AC | 26 ms | 804 KiB |
| 07.txt | AC | 25 ms | 928 KiB |
| 08.txt | AC | 26 ms | 796 KiB |
| 09.txt | AC | 27 ms | 804 KiB |
| 10.txt | AC | 27 ms | 804 KiB |
| 11.txt | AC | 27 ms | 928 KiB |
| 12.txt | AC | 27 ms | 804 KiB |
| sample_01.txt | AC | 28 ms | 924 KiB |
| sample_02.txt | AC | 26 ms | 916 KiB |
| sample_03.txt | AC | 28 ms | 924 KiB |