結果

問題 No.304 鍵(1)
ユーザー sasa
提出日時 2025-03-07 16:43:14
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 255 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 25,856 KB
実行使用メモリ 43,012 KB
最終ジャッジ日時 2025-03-07 16:43:22
合計ジャッジ時間 7,296 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:4:21: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
    4 |         char *key = "locked";
      |                     ^~~~~~~~
main.cpp:10:38: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |                                 scanf("%s",key);
      |                                 ~~~~~^~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
	char *key = "locked";
	for(int i = 0;i < 9;i++){
		for(int j = 0;j < 9;j++){
			for(int k = 0;k < 9;k++){
				printf("%d%d%d",i,j,k);
				
				scanf("%s",key);
				if(key == "unlocked"){
					return 0;
				}
			}
		}	
	}
}
0