結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-10 12:51:58 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 528 bytes |
| コンパイル時間 | 323 ms |
| コンパイル使用メモリ | 21,376 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 93.23 |
| 最終ジャッジ日時 | 2024-07-16 12:13:11 |
| 合計ジャッジ時間 | 3,676 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 11 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:17:25: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
17 | scanf("%d%s",&r,d);
| ^~~~~~~~~~~~~~~~~~
main.c:29:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
29 | scanf("%d%s",&r,d);
| ^~~~~~~~~~~~~~~~~~
ソースコード
#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,n;
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;}
n = r;
if(j == 0){c = r;}
else{
if(c > n){a[i] == 0;continue;}
if(c < n){a[i] == j;continue;}
}
}
}
prans(a);
fflush(stdout);
scanf("%d%s",&r,d);
if(r == 10){return 0;}
return 0;
}