結果

問題 No.1101 鼻水
ユーザー face4face4
提出日時 2020-07-19 14:49:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 62,464 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-16 05:51:08
合計ジャッジ時間 1,762 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
typedef long long ll;

int main(){
    ll v, t, p;
    cin >> v >> t >> p;
    ll ret = v*(p+1)+1;
    ll res = ret-1;
    while(res >= t){
        ll add = res/t;
        ret += add;
        res %= t;
        res += add;
    }
    cout << ret << endl;
    return 0;
}
0