結果
問題 |
No.316 もっと刺激的なFizzBuzzをください
|
ユーザー |
|
提出日時 | 2017-01-19 21:32:30 |
言語 | Java (openjdk 23) |
結果 |
TLE
|
実行時間 | - |
コード長 | 526 bytes |
コンパイル時間 | 3,336 ms |
コンパイル使用メモリ | 78,792 KB |
実行使用メモリ | 363,264 KB |
最終ジャッジ日時 | 2024-12-23 01:35:02 |
合計ジャッジ時間 | 40,927 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 TLE * 1 |
other | AC * 18 RE * 2 TLE * 13 |
ソースコード
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).filter(f->f%a==0||f%b==0||f%c==0).toArray().length); } }