結果

問題 No.304 鍵(1)
コンテスト
ユーザー yamaken1343
提出日時 2015-12-03 21:45:38
言語 C90
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 274 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 243 ms
コンパイル使用メモリ 21,416 KB
最終ジャッジ日時 2026-02-23 19:56:30
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: error: C++ style comments are not allowed in ISO C90
    6 |         //printf("000\n");
      |         ^
main.c:6:9: note: (this will be reported only once per input file)
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%s",a);
      |         ^~~~~~~~~~~~~
main.c:15:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |                 scanf("%s",a);
      |                 ^~~~~~~~~~~~~

ソースコード

diff #
raw source code

#include<stdio.h>
#include<string.h>
int main(void){
	int i=0;
	char a[10];
	//printf("000\n");
	scanf("%s",a);
	while(strcmp(a,"unlocked") != 0){
		if(i<10){
			printf("00");
		}else if(i<100){
			printf("0");
		}
		printf("%d\n",i);
		scanf("%s",a);
		i++;
	}
	return 0;
}
0