結果

問題 No.478 一般門松列列
ユーザー kotatsugamekotatsugame
提出日時 2017-01-28 19:21:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 726 ms
コンパイル使用メモリ 64,824 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 21:23:10
合計ジャッジ時間 2,286 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 34
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
main()
{
	int n,k,c[]={1,3,2,4};cin>>n>>k;
	for(int i=0;i<k;i++)cout<<1<<" ";
	for(int i=0;i<n-k;i++)cout<<(i?" ":"")<<c[i%4];
	cout<<endl;
}
0