結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-03 17:40:20 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 461 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 21,376 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 1.38 |
| 最終ジャッジ日時 | 2024-07-16 23:55:43 |
| 合計ジャッジ時間 | 3,740 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 TLE * 1 -- * 11 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:28:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
28 | scanf("%d %s",&a,b);
| ^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <stdlib.h>
int main(){
int answer[10]={-1};
int a=0,result=0;
char b[10];
int i=0,j;
do{
if(a>result){
i++;
result = a;
answer[i]++;
}
else if (a<result){
answer[i]--;
i++;
}
else{
answer[i]++;
}
for(j=0;j<10;j++){
printf("%d",answer[j]);
}
printf("\n");
fflush(stdout);
scanf("%d %s",&a,b);
}while(a!=10);
return 0;
}