結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー sasa
提出日時 2025-03-10 13:57:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 382 bytes
コンパイル時間 504 ms
コンパイル使用メモリ 24,832 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-10 13:57:24
合計ジャッジ時間 1,542 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other AC * 5 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:11:21: warning: ‘str1’ is used uninitialized [-Wuninitialized]
   11 |         while(str1[i] != '\0'){
      |               ~~~~~~^
main.cpp:5:14: note: ‘str1’ declared here
    5 |         char str1[12346];
      |              ^~~~
main.cpp:16:21: warning: ‘str2’ is used uninitialized [-Wuninitialized]
   16 |         while(str2[i] != '\0'){
      |               ~~~~~~^
main.cpp:6:14: note: ‘str2’ declared here
    6 |         char str2[12346];
      |              ^~~~

ソースコード

diff #

#include <stdio.h>
#include <stdbool.h>

int main(){
	char str1[12346];
	char str2[12346];
	
	int valueflg = true;
	
	int i = 0;
	while(str1[i] != '\0'){
		if(str1[i] <= '0' && str1[i] >= '9'){
			valueflg = false;
		}
	}
	while(str2[i] != '\0'){
		if(str2[i] <= '0' && str2[i] >= '9'){
			valueflg = false;
		}
	}
	if(valueflg == true){
		printf("OK");
	}else{
		printf("NG");
	}
}
0