結果

問題 No.586 ダブルブッキング
ユーザー fal_rndfal_rnd
提出日時 2017-11-11 18:29:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 1,064 bytes
コンパイル時間 2,809 ms
コンパイル使用メモリ 80,524 KB
実行使用メモリ 56,076 KB
最終ジャッジ日時 2023-08-16 07:45:32
合計ジャッジ時間 4,911 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,672 KB
testcase_01 AC 128 ms
53,904 KB
testcase_02 AC 131 ms
55,784 KB
testcase_03 AC 139 ms
56,076 KB
testcase_04 AC 130 ms
56,028 KB
testcase_05 AC 138 ms
55,452 KB
testcase_06 AC 130 ms
55,448 KB
testcase_07 AC 128 ms
55,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.stream.IntStream;
import java.util.stream.Stream;

class Main{
	static class System{
		private static final InputStream in=java.lang.System.in;
		private static final PrintWriter out=new PrintWriter(java.lang.System.out,false);
	}
	public static void main(String[]$){
		new Main().solve();
		System.out.flush();
	}
	static Scanner s=new Scanner(System.in);
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static int gInt(){return s.nextInt();}
	static long gLong(){return s.nextLong();}
	static long gDouble(){return s.nextLong();}

	static IntStream ints(int n){return REPS(n).map(i->gInt());}
	static Stream<String> strs(int n){return REPS(n).mapToObj(i->s.next());}

	private void solve(){
		int v=gInt()+gInt();
		HashSet<Integer> set=new HashSet<>();
		System.out.println(
				ints(gInt())
				.filter(i->!set.add(i))
				.count()
				*v
				);
	}
}
0