結果
問題 | No.604 誕生日のお小遣い |
ユーザー |
![]() |
提出日時 | 2017-12-05 18:23:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 283 bytes |
コンパイル時間 | 358 ms |
コンパイル使用メモリ | 56,232 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 19:19:18 |
合計ジャッジ時間 | 1,090 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<iostream>#include<algorithm>using namespace std;typedef unsigned long long int ull ;ull A;ull B;ull C;int main(void){cin >> A;cin >> B;cin >> C;int i = 1;ull money = 0;cout << A*(C/(A+B-1)) + min(C%(A+B-1),A) << endl;return 0;}