結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-28 20:18:19 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 801 bytes |
| コンパイル時間 | 3,064 ms |
| コンパイル使用メモリ | 74,484 KB |
| 実行使用メモリ | 50,512 KB |
| 最終ジャッジ日時 | 2024-11-22 04:21:14 |
| 合計ジャッジ時間 | 4,711 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 13 |
ソースコード
import java.io.*;
public class No446{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String a = br.readLine();
String b = br.readLine();
char[] A = a.toCharArray();
char[] B = b.toCharArray();
if(check(a, A) && check(b, B)) System.out.println("YES");
else System.out.println("NO");
}
public static boolean check(String a, char[] A){
boolean c = false;
int count = 0;
for(int i=0; i < A.length; i++)
if(Character.isDigit(A[i])) count++;
if(count == A.length){
int num = Integer.parseInt(a);
if(0 < num && num < 12345 ) c = true;
}
return c;
}
}