結果
問題 | No.305 鍵(2) |
ユーザー |
|
提出日時 | 2016-06-03 17:23:46 |
言語 | C90 (gcc 12.3.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 21,632 KB |
実行使用メモリ | 38,576 KB |
最終ジャッジ日時 | 2024-07-16 23:55:50 |
合計ジャッジ時間 | 6,701 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 12 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:24:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | scanf("%d %s",&a,b); | ^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>#include <stdlib.h>int main(){int answer[10]={0};int a=10,result=10;char b[10];int i=0,j;do{if(a>result){answer[i]--;i++;}else{result = a;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;}