結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2016-05-31 08:51:19 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 626 ms / 2,000 ms |
コード長 | 433 bytes |
コンパイル時間 | 3,369 ms |
コンパイル使用メモリ | 74,284 KB |
実行使用メモリ | 59,728 KB |
最終ジャッジ日時 | 2024-10-12 02:20:05 |
合計ジャッジ時間 | 19,518 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
ソースコード
import java.util.*; public class Exercises1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); int num = sc.nextInt(); int[] array = new int[num]; for (int n = 0; n < num; n++){ array[n] = sc.nextInt(); } for (int i = array.length - 1; i >= 0; i--){ if (array[i] == num){ num--; } } System.out.println(num); } }