用户输出
7219
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#48987 | #1254. 含金量 | Accepted | 100 | 40 ms | 440 K | C++ 11 / 3.2 K | feicheng | 2021-05-20 0:37:24 |
/*
If you are full of hope,you will be invincible.
Writer:feicheng
Problem Number:
*/
#include <cstdio>
#include <ctime>
#include <algorithm>
#include <cstring>
#include <iostream>
#include <random>
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/hash_policy.hpp>
std::mt19937 rnd(time(nullptr) + (unsigned long long)(new char)+20051107);
std::mt19937_64 Rnd(time(nullptr) + (unsigned long long)(new char)+20060923);
constexpr char endl = '\n';
namespace hpy {
constexpr int HL = 1 << 19;
char buf[HL], buff[HL], *t1 = buf, *t2 = buf, *T = buff;
#ifdef feicheng
#define getc() getchar()
#else
#define getc() (t1 == t2 && (t2 = (t1 = buf) + fread(buf, 1, HL, stdin), t1 == t2) ? EOF : *t1++)
#endif
inline void flush() { fwrite(buff, 1, T - buff, stdout), T = buff; }
inline void putc(const char ch) { T == buff + HL ? flush(), *T++ = ch : *T++ = ch; }
struct Read {
template <typename Tp>
inline Read &operator>>(Tp &x) {
char ch = getc();
int f = 0;
for (; ch < '0' || ch > '9'; ch = getc()) f = (ch == '-') ? 1 : 0;
x = 0;
for (; ch >= '0' && ch <= '9'; ch = getc()) x = (x << 3) + (x << 1) + (ch ^ 48);
return x = f ? -x : x, *this;
}
inline Read &operator>>(char &c) {
for (c = getc(); c == ' ' || c == '\n'; c = getc())
;
return *this;
}
inline Read &operator>>(char *str) {
int len = 0;
char ch = getc();
while (ch == ' ' || ch == '\n') ch = getc();
while (ch != ' ' && ch != '\n' && ch != '\r' && ch != EOF) str[len++] = ch, ch = getc();
return str[len] = '\0', *this;
}
} cin;
struct Write {
template <typename Tp>
inline Write &operator<<(Tp x) {
if (!x)
return putc('0'), *this;
if (x < 0)
putc('-'), x = -x;
int stk[19], top = 0;
while (x) stk[++top] = x % 10, x /= 10;
while (top) putc(stk[top--] + '0');
return *this;
}
inline Write &operator<<(const char ch) { return putc(ch), *this; }
inline Write &operator<<(char *str) {
int cur = 0;
while (str[cur]) putc(str[cur++]);
return *this;
}
inline Write &operator<<(const char *str) {
int cur = 0;
while (str[cur]) putc(str[cur++]);
return *this;
}
} cout;
template <typename Tp>
inline Tp max(const Tp &a, const Tp &b) {
return a > b ? a : b;
}
template <typename Tp, typename... Rst>
Tp max(const Tp &a, const Rst... rst) {
return max(a, max(rst...));
}
template <typename Tp>
inline Tp min(const Tp &a, const Tp &b) {
return a < b ? a : b;
}
template <typename Tp, typename... Rst>
Tp min(const Tp &a, const Rst... rst) {
return min(a, min(rst...));
}
} // namespace hpy
using hpy::cin;
using hpy::cout;
using hpy::max;
using hpy::min;
int x, y, z;
namespace hl {
inline void fc() {
cin >> x >> y >> z;
if (y * z % x == 0)
cout << y * z / x - 1 << endl;
else
cout << y * z / x << endl;
}
} // namespace hl
int main(int argc, const char **argv) {
#ifdef feicheng
freopen("wild.in", "r", stdin);
freopen("wild.out", "w", stdout);
#endif
hl::fc();
#ifdef feicheng
std::cout << "your program costs " << (double)clock() / CLOCKS_PER_SEC << " s" << std::endl;
#endif
return hpy::flush(), 0;
}