結果
| 問題 | No.316 もっと刺激的なFizzBuzzをください |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-19 21:31:07 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 537 bytes |
| 記録 | |
| コンパイル時間 | 1,804 ms |
| コンパイル使用メモリ | 84,444 KB |
| 実行使用メモリ | 50,424 KB |
| 最終ジャッジ日時 | 2026-05-29 04:20:39 |
| 合計ジャッジ時間 | 6,732 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 32 |
ソースコード
import java.util.Scanner;
import java.util.stream.IntStream;
/**
* Created by nullzine on 2017/01/19.
*/
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
String[] strs = sc.nextLine().split(" ");
int a=Integer.parseInt(strs[0]),b=Integer.parseInt(strs[1]),c=Integer.parseInt(strs[2]);
System.out.println(IntStream.range(1,n+1).parallel().filter(f->f%a==0||f%b==0||f%c==0).toArray().length);
}
}