buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
#include <iostream>
#define rep(i, z) for (int i = 0; i < (int)(z); i++)
#define rep1(i, z) for (int i = 1; i <= (int)(z); i++)
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
using pear = pair<int, int>;
int main() {
ll a, b, n;
cin >> a >> b >> n;
if (n >= b)
... | #include <bits/stdc++.h>
#include <iostream>
#define rep(i, z) for (int i = 0; i < (int)(z); i++)
#define rep1(i, z) for (int i = 1; i <= (int)(z); i++)
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
using pear = pair<int, int>;
int main() {
ll a, b, n;
cin >> a >> b >> n;
if (n >= b)
... | [["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25]] | 1 | 109 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(final String[] args) {
final FastScanner scanner = new FastScanner(System.in);
final long a = scanner.nextLon... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(final String[] args) {
final FastScanner scanner = new FastScanner(System.in);
final long a = scanner.nextLon... | [["+", 0, 503, 49, 200, 51, 16, 31, 16, 17, 48], ["+", 0, 503, 49, 200, 51, 16, 31, 16, 12, 22]] | 3 | 347 |
import math
def f(a, b, x):
return math.floor(a*x/b) - 5 * math.floor(x/b)
a, b, n = map(int, input().split())
max = 0
if b < n:
print(f(a, b, b-1))
else:
print(f(a, b, n)) | import math
def f(a, b, x):
return math.floor(a*x/b) - 5 * math.floor(x/b)
a, b, n = map(int, input().split())
max = 0
if b <= n:
print(f(a, b, b-1))
else:
print(f(a, b, n)) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]] | 5 | 86 |
#include <bits/stdc++.h>
#define io ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define ll long long
#define ull unsigned long long
#define pii pair<ll, ll>
#define piii pair<ll, pair<ll, ll>>
#define debug(x) cout << #x << " = " << x << endl
using namespace std;
const int N = 200005;
ll t, n, m, k, q, a, ... | #include <bits/stdc++.h>
#define io ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define ll long long
#define ull unsigned long long
#define pii pair<ll, ll>
#define piii pair<ll, pair<ll, ll>>
#define debug(x) cout << #x << " = " << x << endl
using namespace std;
const int N = 200005;
ll t, n, m, k, q, a, ... | [["-", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22]] | 1 | 139 |
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define full(a) a.begin(), a.end()
#define rfull(a) a.rbegin(), a.rend()
using namespace std;
const double pi = acos(-1.0);
const double pii = 2 * pi;
const double eps = 1e-6;
const long long MOD = 1e9 + 7;
void solve(... | #include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define full(a) a.begin(), a.end()
#define rfull(a) a.rbegin(), a.rend()
using namespace std;
const double pi = acos(-1.0);
const double pii = 2 * pi;
const double eps = 1e-6;
const long long MOD = 1e9 + 7;
void solve(... | [["-", 49, 50, 51, 41, 15, 23, 0, 16, 17, 47], ["+", 49, 50, 51, 41, 15, 23, 0, 16, 17, 20]] | 1 | 156 |
#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
int main() {
int64_t A, B, N;
cin >> A >> B >> N;
if (B <= N)
cout << (N - 1) * A / B;
else
cout << N * A / B;
} | #include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
int main() {
int64_t A, B, N;
cin >> A >> B >> N;
if (B <= N)
cout << (B - 1) * A / B;
else
cout << N * A / B;
} | [["-", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22]] | 1 | 59 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
long b = scan.nextLong();
long n = scan.nextLong();
long x = Math.min(n, b);
System.out.println((a * x / b) - a * (x / b));
}
} | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
long b = scan.nextLong();
long n = scan.nextLong();
long x = Math.min(n, b - 1);
System.out.println((a * x / b) - a * (x / b));
}
} | [["+", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["+", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]] | 3 | 97 |
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int64_t a, b, c;
cin >> a >> b >> c;
int64_t x = b < c ? b - 1 : c;
cout << a * x / b << endl;
return 0;
} | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int64_t a, b, c;
cin >> a >> b >> c;
int64_t x = b <= c ? b - 1 : c;
cout << a * x / b << endl;
return 0;
}
| [["-", 0, 43, 49, 50, 51, 41, 15, 16, 17, 18], ["+", 0, 43, 49, 50, 51, 41, 15, 16, 17, 19]] | 1 | 57 |
import math
A, B, N = map(int, input().split())
left = -1
right = N
def check(x):
global A, B
return math.floor(A * x / B) - A * math.floor(x / B)
if B == N:
print(check(N - 1))
else:
print(check(N))
| import math
A, B, N = map(int, input().split())
left = -1
right = N
def check(x):
global A, B
return math.floor(A * x / B) - A * math.floor(x / B)
if B <= N:
print(check(B - 1))
else:
print(check(N))
| [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22]] | 5 | 82 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
/* ll t;
cin>>t;
while(t--) */
{
ll i, j, k, l, m, n, a, b, c, d, cnt = 0;
cin >> a >> b >> n;
if (b < n)
c = b - 1;
else
c = n;
d = (a * (c)) / b;
cout << d << endl;
}
}
| #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
/* ll t;
cin>>t;
while(t--) */
{
ll i, j, k, l, m, n, a, b, c, d, cnt = 0;
cin >> a >> b >> n;
if (b <= n)
c = b - 1;
else
c = n;
d = (a * (c)) / b;
cout << d << endl;
}
}
| [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b, n, x, ans;
cin >> a >> b >> n;
if (n <= b) {
ans = floor(a * n / b) - a * floor(n / b);
} else {
x = n - n % b - 1;
ans = floor(a * x / b) - a * floor(x / b);
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b, n, x, ans;
cin >> a >> b >> n;
if (n < b) {
ans = floor(a * n / b) - a * floor(n / b);
} else {
x = n - n % b - 1;
ans = floor(a * x / b) - a * floor(x / b);
}
cout << ans << endl;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 99 |
s = list(map(int, input().split()))
a = s[0]
b = s[1]
n = s[2]
if n % b == 0:
n = n - 1
kotae = round(a * ((n / b) - (n // b)) - ((a * n / b) - ((a * n) // b)))
print(kotae) | s = list(map(int, input().split()))
a = s[0]
b = s[1]
n = s[2]
if n >= b:
n = b - 1
kotae = round(a * ((n / b) - (n // b)) - ((a * n / b) - ((a * n) // b)))
print(kotae) | [["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22]] | 5 | 91 |
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
void A(void);
void B(void);
void C(void);
void D(void);
int main(void) { D(); }
void D(void) {
long long int a, b, n, x, f;
cin >> a >> b >> n;
if (b <= n)
x = b;
else
x = n;
f = floor(a * x / b) - a * (x / b);
cout << f ... | #include <iostream>
#include <math.h>
#include <vector>
using namespace std;
void A(void);
void B(void);
void C(void);
void D(void);
int main(void) { D(); }
void D(void) {
long long int a, b, n, x, f;
cin >> a >> b >> n;
if (b <= n)
x = b - 1;
else
x = n;
f = floor(a * x / b) - a * (x / b);
cout <... | [["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 13]] | 1 | 113 |
a, b, n = map(int, input().split())
print(math.floor(a * min((b - 1), n) / b)) | import math
a, b, n = map(int, input().split())
print(math.floor(a * min((b - 1), n) / b)) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]] | 5 | 40 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long int
int main(void) {
ll a, b, n;
ll max = 0;
ll ans, i, ch;
scanf("%lld %lld %lld", &a, &b, &n);
if (b < n) {
max = (a * (b - 1)) / b;
} else {
max = (a * n) / b;
}
printf("%lld\n", max);
retur... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long int
int main(void) {
ll a, b, n;
ll max = 0;
ll ans, i, ch;
scanf("%lld %lld %lld", &a, &b, &n);
if (b <= n) {
max = (a * (b - 1)) / b;
} else {
max = (a * n) / b;
}
printf("%lld\n", max);
retu... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19]] | 0 | 101 |
a,b,n=map(int,input().split())
if (n<=b):
print(a*n//b)
else:
print(a*(b-1)//b) | a,b,n=map(int,input().split())
if (n<b):
print(a*n//b)
else:
print(a*(b-1)//b) | [["-", 0, 656, 0, 57, 15, 23, 0, 666, 667, 19], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 18]] | 5 | 47 |
A,B,N = map(int, input().split())
ans = 0
if B >= N:
ans = (A*(B-1))//B
else:
ans = (A*(N))//B
print(ans) | A,B,N = map(int, input().split())
ans = 0
if B <= N:
ans = (A*(B-1))//B
else:
ans = (A*(N))//B
print(ans) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]] | 5 | 56 |
#include <cmath>
#include <iostream>
#include <numeric>
using namespace std;
using ll = long long;
int main() {
ll A, B, N;
cin >> A >> B >> N;
ll g = gcd(A, B);
ll a = A / g;
ll b = B / g;
ll r;
if (N >= b - 1) {
r = B - 1;
} else {
r = N;
}
ll ans = floor((double)a * (double)r / (doub... | #include <cmath>
#include <iostream>
#include <numeric>
using namespace std;
using ll = long long;
int main() {
ll A, B, N;
cin >> A >> B >> N;
ll g = gcd(A, B);
ll a = A / g;
ll b = B / g;
ll r;
if (N >= B - 1) {
r = B - 1;
} else {
r = N;
}
ll ans = floor((double)a * (double)r / (doub... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 117 |
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <queue>
#include <set>
#include <vector>
//#include <bits/stdc++.h>
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <queue>
#include <set>
#include <vector>
//#include <bits/stdc++.h>
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 219 |
#include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#include <iterator>
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
using namespace std;
#define f first
#define s second
#define pb push_back
#define pp pop_back
#define mp make_pair
#define sz(x) (int)x.size()
#define sqr(x) ((x)*1ll... | #include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#include <iterator>
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
using namespace std;
#define f first
#define s second
#define pb push_back
#define pp pop_back
#define mp make_pair
#define sz(x) (int)x.size()
#define sqr(x) ((x)*1ll... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 332 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> p_ll;
typedef vector<pair<ll, ll>>
vec_p; // vector<pair<ll, ll>> pairs(n) ,pairs.at(i) = make_pair(i*i, i)
#define ture ture
#define flase false
#define falg flag
#define REP(i, x) for (ll i = 0; i < (ll)(x); i++)
#defi... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> p_ll;
typedef vector<pair<ll, ll>>
vec_p; // vector<pair<ll, ll>> pairs(n) ,pairs.at(i) = make_pair(i*i, i)
#define ture ture
#define flase false
#define falg flag
#define REP(i, x) for (ll i = 0; i < (ll)(x); i++)
#defi... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 267 |
import math
A, B, N = map(int, input().split())
if N // B == 0:
f, _ = math.modf(N / B)
ans = math.floor(A * f)
else:
n = (N // B) * B - 1
f1, _ = math.modf(n)
f2, _ = math.modf(N / B)
f = max(f1, f2)
ans = math.floor(A * f)
print(ans) | import math
A, B, N = map(int, input().split())
if N // B == 0:
f, _ = math.modf(N / B)
ans = math.floor(A * f)
else:
n = (N // B) * B - 1
f1, _ = math.modf(n / B)
f2, _ = math.modf(N / B)
f = max(f1, f2)
ans = math.floor(A * f)
print(ans) | [["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 22]] | 5 | 106 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ull = unsigned long long;
using ll = long long;
int main() {
ll A, B, N;
cin >> A >> B >> N;
ll x = min(B, N);
ll ans = (A * x) / B - A * (x / B);
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ull = unsigned long long;
using ll = long long;
int main() {
ll A, B, N;
cin >> A >> B >> N;
ll x = min(B - 1, N);
ll ans = (A * x) / B - A * (x / B);
cout << ans << endl;
return 0;
}
| [["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 86 |
import math
a,b,n=map(int, input().split())
x=n%b
if n==0:
print(0)
else:
if x==0:
x=b-1
num1=math.floor((a*x)/b)
num2=a*math.floor(x/b)
print(num1-num2) | import math
a,b,n=map(int, input().split())
x=n%b
if n==0:
print(0)
else:
if x==0 or n>=b:
x=b-1
num1=math.floor((a*x)/b)
num2=a*math.floor(x/b)
print(num1-num2) | [["+", 75, 76, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 20]] | 5 | 78 |
a, b, n = map(int, input().split())
if n > b:
print((a * (b-1)) // b)
else:
print((a * n) // b)
| a, b, n = map(int, input().split())
if n >= b-1:
print((a * (b-1)) // b)
else:
print((a * n) // b)
| [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612]] | 5 | 49 |
#include <bits/stdc++.h>
#define ll long long
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define MOD 1... | #include <bits/stdc++.h>
#define ll long long
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define MOD 1... | [["-", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22]] | 1 | 85 |
#include <bits/stdc++.h>
#define rep(l, r) for (int i = (l); i < (r); i++)
typedef long long ll;
using namespace std;
void solve() {
ll a, b, n;
cin >> a >> b >> n;
ll x;
if (n <= b) {
x = n;
} else {
x = b - 1;
}
cout << (floor(a * x / b)) << endl;
}
int main() {
solve();
return 0;
}
| #include <bits/stdc++.h>
#define rep(l, r) for (int i = (l); i < (r); i++)
typedef long long ll;
using namespace std;
void solve() {
ll a, b, n;
cin >> a >> b >> n;
ll x;
if (n < b) {
x = n;
} else {
x = b - 1;
}
cout << (floor(a * x / b)) << endl;
}
int main() {
solve();
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 92 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | [["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22]] | 1 | 293 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N, A, B;
cin >> A >> B >> N;
if (B == 1) {
cout << 0 << '\n';
} else {
cout << (B - 1) * (A / B) + (A % B) * min(N, B - 1) / B << '\n';
// cout << (B - 1) * (A / B) << '\n';
// cout << (A % B) * min(N, B - 1) / B << '\n';
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, A, B;
cin >> A >> B >> N;
if (B == 1) {
cout << 0 << '\n';
} else {
cout << min(N, B - 1) * (A / B) + (A % B) * min(N, B - 1) / B << '\n';
// cout << (B - 1) * (A / B) << '\n';
// cout << (A % B) * min(N, B - 1) / B << '\n... | [["+", 31, 16, 12, 16, 31, 16, 31, 2, 63, 22], ["+", 12, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["+", 12, 16, 31, 16, 31, 2, 3, 4, 0, 21]] | 1 | 84 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long n = sc.nextLong();
if (b == 1) {
System.out.println(0);
return;
... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long n = sc.nextLong();
if (b == 1) {
System.out.println(0);
return;
... | [["-", 8, 196, 0, 503, 49, 200, 51, 16, 17, 85], ["-", 8, 196, 0, 503, 49, 200, 51, 16, 12, 22]] | 3 | 253 |
import math
a,b,n=map(int,input().split())
if n<=b:
print(a*n//b)
else:
print(a*(b-1)//b) | import math
a,b,n=map(int,input().split())
if n<b:
print(a*n//b)
else:
print(a*(b-1)//b) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18]] | 5 | 47 |
/*
Author: Babin Dutta
*/
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long int
#define pb push_back
#define mp make_pair
#define boost \
ios_base::sync_with_stdio(false); ... | /*
Author: Babin Dutta
*/
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long int
#define pb push_back
#define mp make_pair
#define boost \
ios_base::sync_with_stdio(false); ... | [["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 227 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define MOD 1000000007
#define INF 1000000001
using namespace std;
typedef unsigned long long ull;
typedef long long ll... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define MOD 1000000007
#define INF 1000000001
using namespace std;
typedef unsigned long long ull;
typedef long long ll... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 563 |
a,b,n = map(int,input().split())
m = 0
x = n
if b < n:x = b-1
print((a*x//b)) | a,b,n = map(int,input().split())
m = 0
x = n
if b <= n:x = b-1
print((a*x//b)) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]] | 5 | 44 |
#include <bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
using f64 = double;
constexpr i64 INF = INT_FAST64_MAX / 2;
constexpr f64 EPS = DBL_EPSILON;
void solve() {
i64 a, b, n;
cin >> a >> b >> n;
if (n >= b)
n--;
cout << a * n / b - a * (n / b) << endl;
}
int main() {
cin.tie(nullptr)... | #include <bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
using f64 = double;
constexpr i64 INF = INT_FAST64_MAX / 2;
constexpr f64 EPS = DBL_EPSILON;
void solve() {
i64 a, b, n;
cin >> a >> b >> n;
if (n >= b)
n = b - 1;
cout << a * n / b - a * (n / b) << endl;
}
int main() {
cin.tie(nu... | [["-", 8, 9, 0, 57, 64, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 13]] | 1 | 111 |
a, b, n = map(int, input().split())
if b == 1:
print(n)
exit()
if b - 1 <= n:
print((a * (b - 1) // b) - a * ((b - 1) // b))
exit()
print((a * n // b) - a * (n // b)) | a, b, n = map(int, input().split())
if b == 1:
print(0)
exit()
if b - 1 <= n:
print((a * (b - 1) // b) - a * ((b - 1) // b))
exit()
print((a * n // b) - a * (n // b)) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 84 |
// include
// ------------------------------------------------
#include <algorithm>
#include <bits/stdc++.h>
#include <math.h>
#include <vector>
using namespace std;
// func
// ------------------------------------------------
int CalcSumOfDigit(int n); // 各桁の和を計算する。
long long getDigit(long long n); // 数字の桁数を取得す... | // include
// ------------------------------------------------
#include <algorithm>
#include <bits/stdc++.h>
#include <math.h>
#include <vector>
using namespace std;
// func
// ------------------------------------------------
int CalcSumOfDigit(int n); // 各桁の和を計算する。
long long getDigit(long long n); // 数字の桁数を取得す... | [["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25]] | 1 | 429 |
#include <bits/stdc++.h>
#include <unordered_set>
using namespace std;
#define ll long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repeat(i, s, n) for (int(i) = s; (i) < (n); (i)++)
#define revrep(i, n) for (int(i) = (n)-1; i >= 0; i--)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
... | #include <bits/stdc++.h>
#include <unordered_set>
using namespace std;
#define ll long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repeat(i, s, n) for (int(i) = s; (i) < (n); (i)++)
#define revrep(i, n) for (int(i) = (n)-1; i >= 0; i--)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
... | [["+", 0, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 110 |
#include <iostream>
using namespace std;
long long a, b, n, x;
int main() {
cin >> a >> b >> n;
x = min(b, n);
cout << (a * x) / b - a * (x / b);
return 0;
}
| #include <iostream>
using namespace std;
long long a, b, n, x;
int main() {
cin >> a >> b >> n;
x = min(b - 1, n);
cout << (a * x) / b - a * (x / b);
return 0;
}
| [["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 60 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using uint = unsigned int;
template <typename T> using Graph = vector<vector<T>>;
const ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using uint = unsigned int;
template <typename T> using Graph = vector<vector<T>>;
const ... | [["+", 12, 23, 0, 41, 64, 16, 31, 16, 17, 48], ["+", 0, 41, 64, 16, 31, 16, 12, 23, 0, 24], ["+", 64, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["+", 0, 41, 64, 16, 31, 16, 12, 23, 0, 25], ["+", 31, 16, 12, 23, 0, 41, 64, 16, 17, 85], ["+", 31, 16, 12, 23, 0, 41, 64, 16, 12, 22]] | 1 | 186 |
// #include "pch.h"
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include ... | // #include "pch.h"
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include ... | [["-", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 12, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]] | 1 | 435 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
using P = pair<int, int>;
const int MOD = 1000000007;
ll func(ll a, ll b, ll x) { return floor(a * x / b) - a * floor(x / b); }
int main() {
ll a, b, n;
cin >> a >> b >> n;
ll left = 0;
ll right... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
using P = pair<int, int>;
const int MOD = 1000000007;
ll func(ll a, ll b, ll x) { return floor(a * x / b) - a * floor(x / b); }
int main() {
ll a, b, n;
cin >> a >> b >> n;
ll left = 0;
ll right... | [["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 13], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 22]] | 1 | 177 |
# D - Floor Function
A, B, N = map(int, input().split())
X = min(B, N)
print((A*X)//B - A*(X//B))
| # D - Floor Function
A, B, N = map(int, input().split())
X = min(B-1, N)
print((A*X)//B - A*(X//B))
| [["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 45 |
#include <bits/stdc++.h>
//#include <iostream>
using namespace std;
typedef long long ll;
inline int at(ll x, int k) { return (x >> k) & 1; }
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define rrep(i, a, b) for (ll i = a; i >= b; i--)
int main() {
ll a, b, n;
cin >> a >> b >> n;
ll bb;
if (n >= b) {
... | #include <bits/stdc++.h>
//#include <iostream>
using namespace std;
typedef long long ll;
inline int at(ll x, int k) { return (x >> k) & 1; }
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define rrep(i, a, b) for (ll i = a; i >= b; i--)
int main() {
ll a, b, n;
cin >> a >> b >> n;
ll bb;
if (n >= b) {
... | [["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 116 |
#include <bits/stdc++.h>
using namespace std;
class Debug {
private:
static int NAME_LENGTH, MAX_WIDTH;
static bool IS_MATRIX;
static long long INF;
public:
static void set_NAME_LENGTH(int l) { NAME_LENGTH = l; }
static int get_NAME_LENGTH() { return NAME_LENGTH; }
static void set_MAX_WIDTH(int w) { MAX_W... | #include <bits/stdc++.h>
using namespace std;
class Debug {
private:
static int NAME_LENGTH, MAX_WIDTH;
static bool IS_MATRIX;
static long long INF;
public:
static void set_NAME_LENGTH(int l) { NAME_LENGTH = l; }
static int get_NAME_LENGTH() { return NAME_LENGTH; }
static void set_MAX_WIDTH(int w) { MAX_W... | [["+", 31, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 2,613 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) (x).begin(), (x).end()
#define bit(x) (1L << (x))
using ll = long long;
using namespace std;
template <typename T> vector<T> make_v(size_t a, T b) {
return vector<T>(a, b);
}
template <typename... Ts> auto make_v(size_t a, Ts...... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) (x).begin(), (x).end()
#define bit(x) (1L << (x))
using ll = long long;
using namespace std;
template <typename T> vector<T> make_v(size_t a, T b) {
return vector<T>(a, b);
}
template <typename... Ts> auto make_v(size_t a, Ts...... | [["-", 31, 16, 12, 16, 31, 16, 12, 23, 0, 24], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["-", 31, 16, 12, 16, 31, 16, 12, 23, 0, 25]] | 1 | 167 |
#include <bits/stdc++.h>
using namespace std;
typedef int64_t ll;
typedef long double ld;
const ll MOD = 1000000007;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
long long gcd(long long a, long long b) {
ll gcdmax = max(a, b);
ll gcdmin = min(a, b);
while (true) {
if (gcdmax % gcdmin == 0)
break;
... | #include <bits/stdc++.h>
using namespace std;
typedef int64_t ll;
typedef long double ld;
const ll MOD = 1000000007;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
long long gcd(long long a, long long b) {
ll gcdmax = max(a, b);
ll gcdmin = min(a, b);
while (true) {
if (gcdmax % gcdmin == 0)
break;
... | [["+", 64, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["-", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 12, 2, 3, 4, 0, 16, 12, 16, 31, 22], ["+", 12, 2, 3, 4, 0, 16, 12, 16, 17, 85], ["+", 12, 2, 3, 4, 0, 16, 12, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 533 |
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long int64;
typedef vector<int> vec;
typedef vector<int64> vec64;
#define db(x) cout << "> " << #x << ": " << x... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long int64;
typedef vector<int> vec;
typedef vector<int64> vec64;
#define db(x) cout << "> " << #x << ": " << x... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 163 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdi... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdi... | [["+", 3, 4, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 16, 12, 23, 0, 25]] | 1 | 235 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
using namespace std;
#define MAXN 1001
#define ll long long
ll A, B, N;
int main() {
scanf("%lld%lld%lld", &A, &B, &N);
ll X = min(N, B - 1ll);
ll ans = A * N / B - A * (X / B);
cou... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
using namespace std;
#define MAXN 1001
#define ll long long
ll A, B, N;
int main() {
scanf("%lld%lld%lld", &A, &B, &N);
ll X = min(N, B - 1ll);
ll ans = A * X / B - A * (X / B);
cou... | [["-", 49, 50, 51, 16, 31, 16, 31, 16, 12, 22], ["+", 49, 50, 51, 16, 31, 16, 31, 16, 12, 22]] | 1 | 91 |
#include <bits/stdc++.h>
#define r1(i, n) for (int i = 0; i < n; i++)
#define r2(i, n) for (int i = 1; i < n + 1; i++)
#define intc(n) \
int n; \
cin >> n;
#define ll long long
#defin... | #include <bits/stdc++.h>
#define r1(i, n) for (int i = 0; i < n; i++)
#define r2(i, n) for (int i = 1; i < n + 1; i++)
#define intc(n) \
int n; \
cin >> n;
#define ll long long
#defin... | [["+", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 17, 48]] | 1 | 118 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define repr(i, a, b) for (in... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define repr(i, a, b) for (in... | [["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 151 |
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define pii pair<int, int>
#define pll pair<long long, long long>
using namespace std;
ll a, b, n, x;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> a >> b >> n;
if... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define pii pair<int, int>
#define pll pair<long long, long long>
using namespace std;
ll a, b, n, x;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> a >> b >> n;
if... | [["-", 8, 9, 0, 1, 0, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 33]] | 1 | 114 |
#int(input())
#map(int,input().split())
#list(map(int,input().split()))
a,b,n=map(int,input().split())
l=[]
if n>=b:
x=b-1
else:
x=n
print(math.floor((a*x)/b)-a*math.floor(x/b)) | #int(input())
#map(int,input().split())
#list(map(int,input().split()))
import math
a,b,n=map(int,input().split())
l=[]
if n>=b:
x=b-1
else:
x=n
print(math.floor((a*x)/b)-a*math.floor(x/b)) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]] | 5 | 66 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#in... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#in... | [["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 16, 12, 74, 39, 77, 39, 86, 0, 96]] | 1 | 263 |
#include <bits/stdc++.h>
#define SZ(x) ((int)(x).size())
#define LEN(x) ((int)(x).length())
using namespace std;
int main() {
long int a, b, n, ans;
cin >> a >> b >> n;
if (n < b) {
ans = floor(a * n / b) - a * floor(n / b);
}
else
ans = floor(a * b - 1 / b) - a * floor(b - 1 / b);
cout << ans;
... | #include <bits/stdc++.h>
#define SZ(x) ((int)(x).size())
#define LEN(x) ((int)(x).length())
using namespace std;
int main() {
long int a, b, n, ans;
cin >> a >> b >> n;
if (n < b) {
ans = floor(a * n / b) - a * floor(n / b);
}
else
ans = floor(a * (b - 1) / b) - a * floor((b - 1) / b);
cout << a... | [["+", 3, 4, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 16, 12, 23, 0, 25], ["+", 12, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 16, 31, 23, 0, 25]] | 1 | 99 |
A,B,N=map(int,input().split())
x=min(A-1,N)
print(int(A*x/B)-A*int(x/B)) | A,B,N=map(int,input().split())
x=min(B-1,N)
print(int(A*x/B)-A*int(x/B)) | [["-", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22]] | 5 | 48 |
s=input().split(' ')
A,B,N=int(s[0]),int(s[1]),int(s[2])
def f(x):
a=np.floor(A*x/B)-A*np.floor(x/B)
return a.astype(int)
if N<B-1:
print(f(N))
else:
print(f(B-1))
| import numpy as np
s=input().split(' ')
A,B,N=int(s[0]),int(s[1]),int(s[2])
def f(x):
a=np.floor(A*x/B)-A*np.floor(x/B)
return a.astype(int)
if N<B-1:
print(f(N))
else:
print(f(B-1))
| [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 0, 656, 0, 596, 141, 704, 141, 673, 0, 22], ["+", 36, 36, 0, 656, 0, 596, 141, 704, 0, 272], ["+", 36, 36, 0, 656, 0, 596, 141, 704, 705, 22]] | 5 | 102 |
import sys
import math as mt
import collections as cc
I=lambda:list(map(int,input().split()))
a,b,n=I()
ans=0
temp=min(n,b)
print(mt.floor((a*temp)/b))
| import sys
import math as mt
import collections as cc
I=lambda:list(map(int,input().split()))
a,b,n=I()
ans=0
temp=min(n,b-1)
print(mt.floor((a*temp)/b))
| [["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 64 |
def main():
a,b,n = map(int,input().split())
if b>n:
print(int(a*(n/b-n//b)))
else:
print(int(a*(1/b)))
if __name__ == "__main__":
main() | def main():
a,b,n = map(int,input().split())
if b>n:
print(int(a*(n/b-n//b)))
else:
print(int(a*((b-1)/b)))
if __name__ == "__main__":
main() | [["+", 0, 657, 12, 23, 0, 657, 31, 23, 0, 24], ["+", 12, 23, 0, 657, 31, 23, 0, 657, 31, 22], ["+", 12, 23, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 657, 12, 23, 0, 657, 31, 23, 0, 25]] | 5 | 70 |
#include <iostream>
using namespace std;
int main() {
long long int A, B, N, i, max, h;
cin >> A >> B >> N;
if (B >= N)
cout << int(A * N / B) - A * int(N / B);
else {
max = int(A * (B - 1) / B);
/*for(i=B+1;i<=N;i++){
if(i%B!= 0){
h = int(A*i/B) - A*int(i/B);
if(h>... | #include <iostream>
using namespace std;
int main() {
long long int A, B, N, i, max, h;
cin >> A >> B >> N;
if (B > N)
cout << int(A * N / B) - A * int(N / B);
else {
max = int(A * (B - 1) / B);
/*for(i=B+1;i<=N;i++){
if(i%B!= 0){
h = int(A*i/B) - A*int(i/B);
if(h>m... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 87 |
a,b,n = map(int,input().split())
if(b < n):
print((a*(b-1))//b)
else:
print((a*n)//b-a*(n//b)) | a,b,n = map(int,input().split())
if(b < n+2):
print((a*(b-1))//b)
else:
print((a*n)//b-a*(n//b)) | [["+", 0, 57, 15, 23, 0, 666, 0, 657, 17, 72], ["+", 0, 57, 15, 23, 0, 666, 0, 657, 12, 612]] | 5 | 59 |
import math
A,B,N = map(int,input().split())
if N < B:
x = N
elif N == B:
x = N
elif N > B:
x = B - 1
s = x / B - x // B
print(math.floor(A * s)) | import math
A,B,N = map(int,input().split())
if N < B:
x = N
elif N == B:
x = B - 1
elif N > B:
x = B - 1
s = x / B - x // B
print(math.floor(A * s)) | [["-", 75, 665, 64, 196, 0, 1, 0, 662, 12, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 66 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, e) for (int i = (int)(s); i <= (int)(e); i++)
#define printYesNo(is_ok) puts(is_ok ? "Yes" : "No");
#define SORT(v) sort(v.begin(), v.end());
#define RSORT(v) sort(v.rbegin(), v.rend());
#define REVERSE(... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, e) for (int i = (int)(s); i <= (int)(e); i++)
#define printYesNo(is_ok) puts(is_ok ? "Yes" : "No");
#define SORT(v) sort(v.begin(), v.end());
#define RSORT(v) sort(v.rbegin(), v.rend());
#define REVERSE(... | [["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 186 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define RFOR(i, n, m) for (int i = (int)(n); i >= (int)(m); i--)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define RITR(x, c) for (__typeof(c.... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define RFOR(i, n, m) for (int i = (int)(n); i >= (int)(m); i--)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define RITR(x, c) for (__typeof(c.... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22]] | 1 | 259 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> //required
#include <ext/pb_ds/tree_policy.hpp> //required
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long lon... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> //required
#include <ext/pb_ds/tree_policy.hpp> //required
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long lon... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 249 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t a, b, n;
cin >> a >> b >> n;
int64_t x, maxi = 0;
int64_t p = (b - 1, n);
int64_t q = p / b;
int64_t ans = a * p / b - a * q;
cout << ans;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t a, b, n;
cin >> a >> b >> n;
int64_t x, maxi = 0;
int64_t p = min(b - 1, n);
int64_t q = p / b;
int64_t ans = a * p / b - a * q;
cout << ans;
} | [["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22]] | 1 | 69 |
#include <bits/stdc++.h>
using namespace std;
#define M 1000000007
#define MM 998244353
#define ll long long
#define pb push_back
#define mem0(a) memset(a, 0, sizeof(a))
#define mem1(a) memset(a, -1, sizeof(a))
#define memf(a) memset(a, false, sizeof(a))
#define all(v) v.begin(), v.end()
#define sz(a) (ll) a.size()
#d... | #include <bits/stdc++.h>
using namespace std;
#define M 1000000007
#define MM 998244353
#define ll long long
#define pb push_back
#define mem0(a) memset(a, 0, sizeof(a))
#define mem1(a) memset(a, -1, sizeof(a))
#define memf(a) memset(a, false, sizeof(a))
#define all(v) v.begin(), v.end()
#define sz(a) (ll) a.size()
#d... | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 13]] | 1 | 409 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define Rep(i, n) for (int i = 1; i <= (n); ++i)
using LL = long long;
using ULL = unsigned long long;
int main() {
LL a, b, n;
cin >> a >> b >> n;
if (b == 1) {
puts("0");
return 0;
}
LL x = max(b - 1, n);
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define Rep(i, n) for (int i = 1; i <= (n); ++i)
using LL = long long;
using ULL = unsigned long long;
int main() {
LL a, b, n;
cin >> a >> b >> n;
if (b == 1) {
puts("0");
return 0;
}
LL x = min(b - 1, n);
... | [["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22]] | 1 | 99 |
#include <bits/stdc++.h>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;
#define all(v) v.begin(), v.end()
#define endl "\n"
#define pb push_back
#define F first
#define S second
#define START \
cin.tie(0); ... | #include <bits/stdc++.h>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;
#define all(v) v.begin(), v.end()
#define endl "\n"
#define pb push_back
#define F first
#define S second
#define START \
cin.tie(0); ... | [["-", 49, 50, 51, 23, 0, 41, 15, 16, 17, 18], ["+", 49, 50, 51, 23, 0, 41, 15, 16, 17, 19]] | 1 | 168 |
import math
a,b,n=map(int,input().split())
if n>b: n=b
print(math.floor((a*n)/b)) | import math
a,b,n=map(int,input().split())
if n>=b: n=b-1
print(math.floor((a*n)/b)) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 43 |
A, B, N = map(int, input().split())
if N <= B:
print((A*(N))//B - A*((N)//B))
else:
print((A*(B-1))//B - A*((B-1)//B)) | A, B, N = map(int, input().split())
if N < B:
print((A*(N))//B - A*((N)//B))
else:
print((A*(B-1))//B - A*((B-1)//B)) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18]] | 5 | 73 |
a, b, n = map(int, input().split())
if b == 1:
print(0)
else:
x = min(b-1, n)
print(floor(a*x/b) - a * floor(x/b)) | from math import floor
a, b, n = map(int, input().split())
if b == 1:
print(0)
else:
x = min(b-1, n)
print(floor(a*x/b) - a * floor(x/b)) | [["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 314], ["+", 36, 36, 0, 656, 0, 686, 687, 673, 0, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 487], ["+", 36, 36, 0, 656, 0, 686, 141, 673, 0, 22]] | 5 | 59 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<long long, long long> P;
struct edge {
long long to, cost;
};
const int inf = 1 << 27;
const long long INF = 1LL << 60;
const int COMBMAX = 1001001;
const long long MOD = 1000000007;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#defin... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<long long, long long> P;
struct edge {
long long to, cost;
};
const int inf = 1 << 27;
const long long INF = 1LL << 60;
const int COMBMAX = 1001001;
const long long MOD = 1000000007;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#defin... | [["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 515 |
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define mod 1000000007
#define max_char 128
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define lbd lower_bound
#define ubd upper_bound
#define PI 3.141592653589793238
#define pf push_front
#define all(x) x.begin(), x.... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define mod 1000000007
#define max_char 128
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define lbd lower_bound
#define ubd upper_bound
#define PI 3.141592653589793238
#define pf push_front
#define all(x) x.begin(), x.... | [["-", 31, 23, 0, 16, 12, 23, 0, 16, 17, 33], ["-", 31, 23, 0, 16, 12, 23, 0, 16, 12, 13], ["-", 12, 23, 0, 16, 31, 23, 0, 16, 17, 33], ["-", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13]] | 1 | 234 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define REP(i, k, n) for (long long i = k; i < (long long)(n); i++)
#define all(a) a.begin(), a.end()
#define pb emplace_back
#define eb emplace_back
#define lb(v, k) (lower_bound(all(v), k) - v.begin())
#defi... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define REP(i, k, n) for (long long i = k; i < (long long)(n); i++)
#define all(a) a.begin(), a.end()
#define pb emplace_back
#define eb emplace_back
#define lb(v, k) (lower_bound(all(v), k) - v.begin())
#defi... | [["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 25]] | 1 | 918 |
#include <algorithm>
#include <cstdint>
#include <cstdio>
int main() {
intmax_t a, b, n;
scanf("%jd %jd %jd", &a, &b, &n);
auto f = [&](intmax_t x) { return (a * x) / b - a * (x / b); };
intmax_t res = f(n);
if (n > b)
res = std::max(res, f(b - 1));
printf("%jd\n", res);
}
| #include <algorithm>
#include <cstdint>
#include <cstdio>
int main() {
intmax_t a, b, n;
scanf("%jd %jd %jd", &a, &b, &n);
auto f = [&](intmax_t x) { return (a * x) / b - a * (x / b); };
intmax_t res = f(n);
if (n >= b)
res = std::max(res, f(b - 1));
printf("%jd\n", res);
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 105 |
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#define LL long long
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
LL A, B, N;
cin >> A >> B >> N;
double ansX = 0;
if (N > B)
ansX = B - 1;
else {
ansX = N;
}
c... | #include <iostream>
#include <math.h>
#include <string>
#include <vector>
#define LL long long
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
LL A, B, N;
cin >> A >> B >> N;
double ansX = 0;
if (N > B - 1)
ansX = B - 1;
else {
ansX = N;
}... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 96 |
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#... | [["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 274 |
import math
ABN = list(map(int, input().split()))
#xがBの倍数であれば全体が0
#その一個手前が最大値
if (ABN[2] > ABN[1]):
print(math.floor(ABN[0] * (ABN[1] - 1) / ABN[1]))
else:
print(math.floor(ABN[0] * ABN[2] / ABN[1]) - ABN[0] * math.floor(ABN[2] / ABN[1])) | import math
ABN = list(map(int, input().split()))
#xがBの倍数であれば全体が0
#その一個手前が最大値
if (ABN[2] >= ABN[1]):
print(math.floor(ABN[0] * (ABN[1] - 1) / ABN[1]))
else:
print(math.floor(ABN[0] * ABN[2] / ABN[1]) - ABN[0] * math.floor(ABN[2] / ABN[1])) | [["-", 0, 656, 0, 57, 15, 23, 0, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 20]] | 5 | 104 |
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll a, b, n;
scanf("%lld%lld%lld", &a, &b, &n);
ll d;
if (n >= b)
d = n - 1;
else
d = n;
printf("%lld\n", a * d / b);
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll a, b, n;
scanf("%lld%lld%lld", &a, &b, &n);
ll d;
if (n >= b)
d = b - 1;
else
d = n;
printf("%lld\n", a * d / b);
return 0;
} | [["-", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22]] | 1 | 79 |
[A,B,N] = [int(s) for s in input().rstrip().split(' ')]
if B == 1:
print(0)
elif N <= B:
print(A*N//B)
else:
print((A*(B-1))//B) | [A,B,N] = [int(s) for s in input().rstrip().split(' ')]
if B == 1:
print(0)
elif N < B:
print(A*N//B)
else:
print((A*(B-1))//B) | [["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 19], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 18]] | 5 | 69 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typede... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typede... | [["+", 3, 4, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 21], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 22]] | 1 | 155 |
#include <cstring>
#include <iostream>
#define ll long long
using namespace std;
int main() {
ll a, b, n;
cin >> a >> b >> n;
ll c;
if (b >= n)
c = n;
else
c = b - 1;
cout << a * c / b - a * (c / b);
return 0;
} | #include <cstring>
#include <iostream>
#define ll long long
using namespace std;
int main() {
ll a, b, n;
cin >> a >> b >> n;
ll c;
if (b > n)
c = n;
else
c = b - 1;
cout << a * c / b - a * (c / b);
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 71 |
package main
import (
"fmt"
)
func main() {
var a, b, n int64
fmt.Scan(&a)
fmt.Scan(&b)
fmt.Scan(&n)
if n <= b {
fmt.Println(a * n / b)
} else {
fmt.Println(a * (b - 1) / b)
}
}
| package main
import (
"fmt"
)
func main() {
var a, b, n int64
fmt.Scan(&a)
fmt.Scan(&b)
fmt.Scan(&n)
if n < b {
fmt.Println(a * n / b)
} else {
fmt.Println(a * (b - 1) / b)
}
}
| [["-", 0, 435, 8, 196, 0, 57, 15, 16, 17, 19], ["+", 0, 435, 8, 196, 0, 57, 15, 16, 17, 18]] | 7 | 86 |
#include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;
typedef int64_t ll;
int main() {
int64_t A, B, N, ans, t;
cin >> A >> B >> N;
t = (N + 1) / B;
cout << max(A * t / B - A ... | #include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;
typedef int64_t ll;
int main() {
int64_t A, B, N, ans, t;
cin >> A >> B >> N;
t = (N + 1) / B * B - 1;
cout << max(A * t ... | [["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 110 |
#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
typedef long double ld;
template ... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
typedef long double ld;
template ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 31, 22]] | 1 | 657 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define ll long long
using namespace std;
using p = pair<ll, ll>;
ll dx[8] = {0, 1, 0, -1, 1, 1, -1, -1}; // x軸方向への変位
ll dy[8] = {1, 0, -1... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define ll long long
using namespace std;
using p = pair<ll, ll>;
ll dx[8] = {0, 1, 0, -1, 1, 1, -1, -1}; // x軸方向への変位
ll dy[8] = {1, 0, -1... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 167 |
#include <bits/stdc++.h> //Andrei Alexandru a.k.a Sho10
#define ll long long int
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#define all(a) (a).begin(), (a).end()
#define sz size
#define f first
#define s second
#define pb push_back
#define er erase
#define in insert
#define mp make_pair
#define pi pair
#d... | #include <bits/stdc++.h> //Andrei Alexandru a.k.a Sho10
#define ll long long int
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#define all(a) (a).begin(), (a).end()
#define sz size
#define f first
#define s second
#define pb push_back
#define er erase
#define in insert
#define mp make_pair
#define pi pair
#d... | [["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 140 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t a, b, n;
cin >> a >> b >> n;
if (n >= b - 1) {
cout << a * (b - 1) / b << endl;
} else {
cout << a * (n - 1) / b << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t a, b, n;
cin >> a >> b >> n;
if (n >= b - 1) {
cout << a * (b - 1) / b << endl;
} else {
cout << a * n / b << endl;
}
}
| [["-", 31, 16, 12, 16, 31, 16, 12, 23, 0, 24], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["-", 31, 16, 12, 16, 31, 16, 12, 23, 0, 25]] | 1 | 68 |
a,b,n = map(int, input().split())
res=0
if b > n:
res = int(a*n/b) -a*int(n/b)
else:
res = int(a*(b-1)/b) - a*int((b-a)/b)
print(res) | a,b,n = map(int, input().split())
res=0
if b > n:
res = int(a*n/b) -a*int(n/b)
else:
res = int(a*(b-1)/b) - a*int((b-1)/b)
print(res) | [["-", 3, 4, 0, 657, 31, 23, 0, 657, 12, 22], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612]] | 5 | 78 |
// include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
using LL = int64_t;
using VL = vector<LL>;
using VVL = vector<VL>;
using VS = vector<string>;
using PLL = pair<LL, LL>;
// container util
//--------------------... | // include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
using LL = int64_t;
using VL = vector<LL>;
using VVL = vector<VL>;
using VS = vector<string>;
using PLL = pair<LL, LL>;
// container util
//--------------------... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 12, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 16, 31, 23, 0, 25]] | 1 | 1,082 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
long A, B, N;
cin >> A >> B >> N;
cout << (A * min(N, B)) / B << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
long A, B, N;
cin >> A >> B >> N;
cout << (A * min(N, B - 1)) / B << endl;
return 0;
} | [["+", 0, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 49 |
from math import floor
def main():
a, b, n = map(float, input().split())
if n < b:
x = n
else:
x = b
ans = floor(a * x/b) - a * floor(x/b)
print(int(ans))
if __name__ == "__main__":
main()
| from math import floor
def main():
a, b, n = map(float, input().split())
if n < b:
x = n
else:
x = b - 1
ans = floor(a * x/b) - a * floor(x/b)
print(int(ans))
if __name__ == "__main__":
main()
| [["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 76 |
A,B,N = map(int,input().split())
if N<=B:
x = N-1
else:
x = B-1
print((A*x)//B-A*(x//B)) | A,B,N = map(int,input().split())
if N<=B-1:
x = N
else:
x = B-1
print((A*x)//B-A*(x//B)) | [["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 53 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
long long A, B, N;
long long func(long long x) { return (A * x) / B - A * (x / B); }
int main() {
cin >> A >> B >> N;
long long m = B < N ? B - 1 : N;
cout << func(m) << endl;
... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
long long A, B, N;
long long func(long long x) { return (A * x) / B - A * (x / B); }
int main() {
cin >> A >> B >> N;
long long m = B <= N ? B - 1 : N;
cout << func(m) << endl;
... | [["-", 0, 43, 49, 50, 51, 41, 15, 16, 17, 18], ["+", 0, 43, 49, 50, 51, 41, 15, 16, 17, 19]] | 1 | 91 |
a,b,n = map(int, input().split())
if n < b:
print(math.floor(a*n/b) - a*math.floor(n/b))
else:
print(math.floor(a * (b-1) / b) - a * math.floor((b-1) / b))
| import math
a,b,n = map(int, input().split())
if n < b:
print(math.floor(a*n/b) - a*math.floor(n/b))
else:
print(math.floor(a * (b-1) / b) - a * math.floor((b-1) / b)) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]] | 5 | 81 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(V) V.begin(), V.end()
#define MOD 1000000007
int main() {
ll A, B, N;
cin >> A >> B >> N;
cout << A * min(A - 1, N) / B << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(V) V.begin(), V.end()
#define MOD 1000000007
int main() {
ll A, B, N;
cin >> A >> B >> N;
cout << A * min(B - 1, N) / B << endl;
} | [["-", 31, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 31, 22]] | 1 | 56 |
import sys
input = sys.stdin.readline
A, B, N = map(int, input().split())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
ps = ... | import sys
input = sys.stdin.readline
A, B, N = map(int, input().split())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
ps = ... | [["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]] | 5 | 205 |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
using namespace std;
const int MOD = 1000000007;
const ll INF = 1LL << 60;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll a, b, n;
cin >> a >> b >> n;
ll flag = min(b, n);
ll i = flag;
ll num = (a * i) / b - ... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
using namespace std;
const int MOD = 1000000007;
const ll INF = 1LL << 60;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll a, b, n;
cin >> a >> b >> n;
ll flag = min(b - 1, n);
ll i = flag;
ll num = (a * i) / ... | [["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 104 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.