結果
問題 | No.2870 Dice Making |
ユーザー |
![]() |
提出日時 | 2024-09-06 21:22:17 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 272 bytes |
コンパイル時間 | 1,852 ms |
コンパイル使用メモリ | 191,796 KB |
最終ジャッジ日時 | 2025-02-24 03:57:45 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include<bits/stdc++.h>using namespace std;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);int N,M;cin>>N>>M;if(N%M!=0){cout<<"-1"<<endl;return 0;}for(int i=0;i<N;i++)cout<<(i<N/M?1:2)<<" \n"[i+1==N];}