結果
| 問題 |
No.316 もっと刺激的なFizzBuzzをください
|
| コンテスト | |
| ユーザー |
howakuro
|
| 提出日時 | 2015-12-26 00:15:00 |
| 言語 | Java (openjdk 23) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 585 bytes |
| コンパイル時間 | 3,519 ms |
| コンパイル使用メモリ | 74,984 KB |
| 実行使用メモリ | 68,452 KB |
| 最終ジャッジ日時 | 2024-09-19 00:07:01 |
| 合計ジャッジ時間 | 7,964 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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