結果

問題 No.254 文字列の構成
ユーザー krotonkroton
提出日時 2015-07-15 11:05:44
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 26,112 KB
実行使用メモリ 491,340 KB
最終ジャッジ日時 2023-09-22 16:31:54
合計ジャッジ時間 40,080 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,084 ms
491,148 KB
testcase_01 AC 919 ms
491,220 KB
testcase_02 AC 948 ms
491,228 KB
testcase_03 AC 905 ms
491,208 KB
testcase_04 AC 903 ms
491,288 KB
testcase_05 AC 902 ms
491,172 KB
testcase_06 AC 904 ms
491,168 KB
testcase_07 AC 905 ms
491,284 KB
testcase_08 AC 905 ms
491,176 KB
testcase_09 AC 906 ms
491,220 KB
testcase_10 AC 902 ms
491,232 KB
testcase_11 AC 904 ms
491,292 KB
testcase_12 AC 904 ms
491,228 KB
testcase_13 AC 905 ms
491,340 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 OLE -
testcase_17 OLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
using namespace std;

const int BUFSIZE = 500000020;
char buf[BUFSIZE+1];

int main(){
  for(int i=0;i<BUFSIZE;i++){
    buf[i] = (i % 26) + 'a'; 
  }
  buf[BUFSIZE] = '\0';

  int N;
  scanf("%d", &N);

  while(N >= BUFSIZE){
    printf("%s", buf);
    N -= BUFSIZE;
  }
  
  for(int i=0;i<N;i++){
    buf[i] = (i % 26) + 'a';
  }
  buf[N] = '\0';
  printf("%s", buf);

  return 0;
}
0