結果
問題 | No.742 にゃんにゃんにゃん 猫の挨拶 |
ユーザー | x87asdf |
提出日時 | 2018-11-05 16:29:55 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 1,081 ms / 2,500 ms |
コード長 | 607 bytes |
コンパイル時間 | 2,059 ms |
コンパイル使用メモリ | 74,224 KB |
実行使用メモリ | 59,324 KB |
最終ジャッジ日時 | 2024-04-30 22:01:59 |
合計ジャッジ時間 | 6,966 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 137 ms
54,324 KB |
testcase_01 | AC | 136 ms
53,968 KB |
testcase_02 | AC | 137 ms
54,388 KB |
testcase_03 | AC | 139 ms
54,140 KB |
testcase_04 | AC | 146 ms
54,092 KB |
testcase_05 | AC | 155 ms
54,264 KB |
testcase_06 | AC | 190 ms
54,144 KB |
testcase_07 | AC | 213 ms
54,600 KB |
testcase_08 | AC | 249 ms
57,088 KB |
testcase_09 | AC | 140 ms
54,124 KB |
testcase_10 | AC | 136 ms
54,296 KB |
testcase_11 | AC | 1,081 ms
59,324 KB |
testcase_12 | AC | 849 ms
58,672 KB |
testcase_13 | AC | 136 ms
54,376 KB |
testcase_14 | AC | 137 ms
54,160 KB |
testcase_15 | AC | 138 ms
54,040 KB |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] destination = new int[sc.nextInt()]; for(int i1=0;i1<destination.length;i1++) { destination[i1] = sc.nextInt(); } int count = 0; for(int i1=0;i1<destination.length;i1++) { for(int i2=1;i2<=i1;i2++) { if(destination[i1] <= destination[i1-i2]) { count++; } } } System.out.println(count); } }