結果
問題 | No.304 鍵(1) |
ユーザー |
|
提出日時 | 2018-12-18 12:56:25 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 53 ms / 2,000 ms |
コード長 | 411 bytes |
コンパイル時間 | 126 ms |
コンパイル使用メモリ | 23,424 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 386.17 |
最終ジャッジ日時 | 2024-07-17 02:05:36 |
合計ジャッジ時間 | 1,015 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:19:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 19 | scanf("%s", str); | ~~~~~^~~~~~~~~~~
ソースコード
#include <stdio.h>#include <stdlib.h>#include <time.h>char str[12];int used[999] = {};int main() {srand(354237);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);elseprintf("%d\n", i);fflush(stdout);scanf("%s", str);if (str[0] == 'u') return 0;}}