結果

問題 No.2870 Dice Making
ユーザー Vicfred
提出日時 2025-04-21 15:29:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 388 bytes
コンパイル時間 627 ms
コンパイル使用メモリ 67,312 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-04-21 15:30:02
合計ジャッジ時間 2,765 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 7 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

// vicfred
// https://yukicoder.me/problems/no/2870
// math
#include <cstdint>
#include <iostream>

using namespace std;

int main() {
  int64_t n, k;
  cin >> n >> k;
  if (n % k != 0) {
    cout << -1 << endl;
  }
  int64_t c = n / k;
  for (int i = 0; i < c; ++i) {
    cout << 1 << " ";
  }
  for(int i = c; i < n; ++i) {
    cout << 2 << "\n "[i == n - 1 ? 0 : 1];
  }
  return 0;
}
0