結果
| 問題 |
No.634 硬貨の枚数1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-19 22:08:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 295 bytes |
| コンパイル時間 | 1,776 ms |
| コンパイル使用メモリ | 165,676 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-25 19:01:02 |
| 合計ジャッジ時間 | 12,977 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 74 WA * 1 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
int main(){
int n;cin>>n;
int Min=INT_MAX;
for(int k=5000;k>=1;k--){
int cnt=0;
int N=n;
for(int t=k;t>=1;t--){
int a=(t+1)*t/2;
cnt+=N/a;
N%=a;
}
Min=min(Min,cnt);
}
cout<<Min<<endl;
}