結果
| 問題 | No.316 もっと刺激的なFizzBuzzをください |
| コンテスト | |
| ユーザー |
howakuro
|
| 提出日時 | 2015-12-26 00:15:00 |
| 言語 | Java (openjdk 26.0.2.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 585 bytes |
| 記録 | |
| コンパイル時間 | 2,160 ms |
| コンパイル使用メモリ | 83,748 KB |
| 実行使用メモリ | 50,484 KB |
| 最終ジャッジ日時 | 2026-08-30 15:07:52 |
| 合計ジャッジ時間 | 7,111 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 32 |
ソースコード
import java.util.Scanner;
public class PracticalFizbuzz {
static Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
int count = 1;
int numbercount = 0;
int N = scan.nextInt();
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
while(count<=N){
if(count%a==0){
numbercount++;
count++;
continue;
}
if(count%b==0){
numbercount++;
count++;
continue;
}
if(count%c==0){
numbercount++;
count++;
continue;
}
count++;
}
System.out.println(numbercount);
}
}
howakuro