結果
問題 | No.305 鍵(2) |
ユーザー | butsurizuki |
提出日時 | 2017-01-10 12:57:36 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 508 bytes |
コンパイル時間 | 373 ms |
コンパイル使用メモリ | 23,712 KB |
実行使用メモリ | 24,360 KB |
平均クエリ数 | 52.38 |
最終ジャッジ日時 | 2023-09-24 00:49:43 |
合計ジャッジ時間 | 2,001 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 29 ms
23,520 KB |
testcase_01 | AC | 25 ms
23,340 KB |
testcase_02 | AC | 26 ms
23,964 KB |
testcase_03 | AC | 25 ms
23,364 KB |
testcase_04 | AC | 26 ms
24,000 KB |
testcase_05 | AC | 27 ms
23,364 KB |
testcase_06 | AC | 23 ms
24,360 KB |
testcase_07 | AC | 24 ms
23,628 KB |
testcase_08 | AC | 27 ms
23,808 KB |
testcase_09 | AC | 25 ms
23,340 KB |
testcase_10 | AC | 25 ms
23,604 KB |
testcase_11 | AC | 25 ms
23,796 KB |
testcase_12 | AC | 24 ms
23,988 KB |
ソースコード
#include <stdio.h> void prans(int x[]){ int i; for(i = 1;i <= 10;i++){printf("%d",x[i]);} printf("\n"); } int main(void){ int t[16]={0},a[16]={0},i,j,r,c; char d[16]; for(i = 1;i <= 10;i++){ for(j = 0;j <= 9;j++){ t[i] = j; prans(t); fflush(stdout); scanf("%d%s",&r,d); if(r == 10){return 0;} if(j == 0){c = r;} else{ if(c > r){a[i] = 0;break;} if(c < r){a[i] = j;break;} } } } prans(a); fflush(stdout); scanf("%d%s",&r,d); if(r == 10){return 0;} return 0; }