結果
問題 |
No.634 硬貨の枚数1
|
ユーザー |
|
提出日時 | 2018-01-19 21:23:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 292 bytes |
コンパイル時間 | 814 ms |
コンパイル使用メモリ | 68,472 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 18:36:34 |
合計ジャッジ時間 | 3,057 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 66 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { long long n; cin >> n; int ans = 0; for (long long i = 10000; i >= 1; i--) { while (n >= i * (i + 1) / 2) { n -= i * (i + 1) / 2; ans++; } } cout << ans << endl; }