結果
問題 |
No.51 やる気の問題
|
ユーザー |
![]() |
提出日時 | 2015-11-23 14:26:19 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 346 bytes |
コンパイル時間 | 652 ms |
コンパイル使用メモリ | 65,132 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 17:16:05 |
合計ジャッジ時間 | 1,423 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <vector> #include <iostream> #include <string> #include <sstream> #include <algorithm> #include <utility> #include <map> using namespace std; typedef long long ll; typedef pair<ll,ll> P; int main(){ ll w,d; cin >> w >> d; ll tmp = 0; for(ll t = d;t >= 1;t--){ tmp = w / (t * t); w -= tmp; } cout << tmp << endl; return 0; }