結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
cww
|
| 提出日時 | 2016-09-16 15:00:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 392 bytes |
| コンパイル時間 | 1,887 ms |
| コンパイル使用メモリ | 167,164 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-17 07:16:31 |
| 合計ジャッジ時間 | 3,635 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
int W, D;
cin >> W >> D;
int sum{}, total{};
for( int i = D; i > 0; i-- )
{
sum = floor( W / pow( D, 2 ) );
total += sum;
cout << sum << " " << total << endl;
W -= sum;
D--;
}
cout << sum << endl;
return 0;
}
cww