結果

問題 No.304 鍵(1)
ユーザー むらためむらため
提出日時 2018-12-18 12:59:27
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 27,816 KB
実行使用メモリ 23,640 KB
平均クエリ数 33.83
最終ジャッジ日時 2023-09-24 02:05:05
合計ジャッジ時間 909 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
23,340 KB
testcase_01 AC 25 ms
23,640 KB
testcase_02 AC 25 ms
23,376 KB
testcase_03 AC 22 ms
23,520 KB
testcase_04 AC 21 ms
23,520 KB
testcase_05 AC 21 ms
23,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
char str[12];
int used[999] = {};
int main() {
  srand(61725);
  while (1) {
    int i = 0;
    while (used[i]) i = rand() % 1000;
    used[i] = 1;
    if (i < 10)
      printf("00%d\n", i);
    else if (i < 100)
      printf("0%d\n", i);
    else
      printf("%d\n", i);
    fflush(stdout);
    scanf("%s", str);
    if (str[0] == 'u') return 0;
  }
}
0