結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー HaijinnHaijinn
提出日時 2016-12-18 20:53:52
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 487 bytes
コンパイル時間 611 ms
コンパイル使用メモリ 21,120 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-14 08:36:09
合計ジャッジ時間 1,044 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 9 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
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