結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー HaijinnHaijinn
提出日時 2016-12-18 20:53:52
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 487 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 21,376 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-08 06:46:07
合計ジャッジ時間 913 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 WA -
testcase_02 AC 0 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 0 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 0 ms
5,376 KB
testcase_14 AC 0 ms
5,376 KB
testcase_15 AC 0 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:31:20: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
   31 |                 ab=atoi(a);
      |                    ^~~~
main.c:15:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |         scanf("%s%s",a,b);
      |         ^~~~~~~~~~~~~~~~~

ソースコード

diff #

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


int main(void){
	char a[10000];
	char b[10000];
	int ab;
	int ba;
	int i;
	int m;
	int v;
	int d;
	int s=0;
	scanf("%s%s",a,b);
v=strlen(a);
	d=strlen(b);
	for(i=0;i<v;i++){
	if(a[i] >= '0' && a[i] <= '9'){
		s++;
	
	}
		}
	
		for(m=0;m<d;m++){
	if(b[m] >= '0' && b[m] <= '9'){
		s++;
		
	}
		}
		ab=atoi(a);
		ba=atoi(b);
		if(ab>12345&&ba>12345){
			s++;
		}
		if(s==v+d){
			printf("OK\n");
			
			
		}else{
			printf("NG\n");
		}
	
	return 0;
}
0