結果
問題 |
No.604 誕生日のお小遣い
|
ユーザー |
![]() |
提出日時 | 2018-07-26 14:25:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 282 bytes |
コンパイル時間 | 1,648 ms |
コンパイル使用メモリ | 165,576 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 03:19:12 |
合計ジャッジ時間 | 2,577 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 15 WA * 6 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; //INSERT ABOVE HERE signed main(){ Int a,b,c; cin>>a>>b>>c; Int l=0,r=c; while(l+1<r){ Int m=(l+r)>>1; __int128_t x=m/a,y=m-a; if(x*b+y>=c) r=m; else l=m; } cout<<r<<endl; return 0; }