結果
問題 | No.632 穴埋め門松列 |
ユーザー | fal_rnd |
提出日時 | 2018-04-07 01:14:08 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 118 ms / 1,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 2,215 ms |
コンパイル使用メモリ | 72,020 KB |
実行使用メモリ | 55,868 KB |
最終ジャッジ日時 | 2023-09-08 18:09:07 |
合計ジャッジ時間 | 3,803 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 117 ms
55,552 KB |
testcase_01 | AC | 115 ms
55,436 KB |
testcase_02 | AC | 117 ms
55,664 KB |
testcase_03 | AC | 117 ms
55,564 KB |
testcase_04 | AC | 116 ms
55,692 KB |
testcase_05 | AC | 118 ms
55,868 KB |
ソースコード
import java.util.*; class A{ static Scanner s=new Scanner(System.in); public static void main(String[]$){ int p=0,v[]={get(),get(),get()}; if(v[1]<1)p=1; if(v[2]<1)p=2; f(v,v[p]=1); f(v,v[p]=4); System.out.println(); } static void f(int[] v,int i){ if((v[0]<v[1]&&v[1]>v[2])||(v[0]>v[1]&&v[1]<v[2])) System.out.print(i); } static int get(){ String v=s.next(); return v.equals("?")?0:Integer.parseInt(v); } }