結果

問題 No.1101 鼻水
ユーザー fine
提出日時 2020-07-03 22:38:03
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 438 bytes
コンパイル時間 1,476 ms
コンパイル使用メモリ 166,408 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-17 04:19:11
合計ジャッジ時間 2,183 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

constexpr char newl = '\n';

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    ll v, t, p;
    cin >> v >> t >> p;

    // (T - 1) * (x - 1) + 1

    ll hoge = v * (p + 1);
    ll foo = (hoge - 1) / (t - 1) + 1;
    //cerr << foo << newl;
    ll bar = (t - 1) * (foo - 1) % v;
    cout << 1 + (foo - 1) * t + (v - bar) << newl;

    return 0;
}
0