結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー Mcpu3
提出日時 2018-06-22 20:14:18
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 1,000 ms
コード長 351 bytes
コンパイル時間 1,969 ms
コンパイル使用メモリ 73,600 KB
実行使用メモリ 41,548 KB
最終ジャッジ日時 2024-06-30 18:05:01
合計ジャッジ時間 6,987 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no637{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a,i,s=0;
		for(i=0;i<5;i++) {
			a=stdIn.nextInt();
			if(a%3==0&&a%5==0) s+=8;
			else if(a%3==0||a%5==0) s+=4;
			else {
				while(a>0) {
					a/=10;
					s++;
				}
			}
		}
		System.out.print(s);
	}
}
0