結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| ユーザー |
Haijinn
|
| 提出日時 | 2016-12-18 20:45:45 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 527 bytes |
| コンパイル時間 | 311 ms |
| コンパイル使用メモリ | 21,248 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-14 08:36:08 |
| 合計ジャッジ時間 | 1,328 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 6 WA * 7 |
コンパイルメッセージ
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);
| ^~~~~~~~~~~~~~~~~
ソースコード
#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] >= 'A' && a[i] <= 'Z'){
s++;
printf("1");
}
}
for(m=0;m<d;m++){
if(b[m] >= 'A' && b[m] <= 'Z'){
s++;
printf("1");
}
}
ab=atoi(a);
ba=atoi(b);
if(ab>12345&&ba>12345){
s++;
printf("1");
}
if(ab==0){
printf("OK\n");
}else{
printf("NG\n");
}
return 0;
}
Haijinn