結果

問題 No.304 鍵(1)
ユーザー Haijinn
提出日時 2018-02-13 21:52:21
言語 C90
(gcc 12.3.0)
結果
TLE  
実行時間 -
コード長 233 bytes
コンパイル時間 739 ms
コンパイル使用メモリ 20,992 KB
実行使用メモリ 40,400 KB
最終ジャッジ日時 2024-07-16 15:33:47
合計ジャッジ時間 6,781 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:15:17: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[10]’ [-Wformat=]
   15 |         scanf("%s",&s[i]);
      |                ~^  ~~~~~
      |                 |  |
      |                 |  char (*)[10]
      |                 char *
main.c:15:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |         scanf("%s",&s[i]);
      |         ^~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<string.h>
#include<ctype.h>



int main(){
int a;
int i;
char s[1000][10];
for(i=0;i<=999;i++){
	
	printf("%03d\n",i);
	
	scanf("%s",&s[i]);
	if(strcmp(s[i],"unlocked")==0){
		
		break;
	}
	
}

	return 0;
}
0