結果
問題 | No.138 化石のバージョン |
ユーザー |
|
提出日時 | 2016-03-11 18:20:59 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 137 ms / 5,000 ms |
コード長 | 615 bytes |
コンパイル時間 | 2,606 ms |
コンパイル使用メモリ | 75,212 KB |
実行使用メモリ | 41,492 KB |
最終ジャッジ日時 | 2024-12-29 13:51:51 |
合計ジャッジ時間 | 8,444 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
import java.util.Date;import java.util.Scanner;public class Main{public static void main(String[] args){long exec_time=new Date().getTime();Scanner sc=new Scanner(System.in);String[] str1=sc.nextLine().split("\\.");String[] str2=sc.nextLine().split("\\.");boolean judge=true;for(int i=0;i<3;i++){int a=Integer.parseInt(str1[i]);int b=Integer.parseInt(str2[i]);if(a<b){judge=false;break;}if(a>b){break;}}if(judge){System.out.println("YES");}else{System.out.println("NO");}System.err.println(new Date().getTime()-exec_time);}}