結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー Mcpu3Mcpu3
提出日時 2018-06-22 20:14:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 351 bytes
コンパイル時間 1,880 ms
コンパイル使用メモリ 71,544 KB
実行使用メモリ 57,372 KB
最終ジャッジ日時 2023-09-13 08:05:36
合計ジャッジ時間 7,154 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,444 KB
testcase_01 AC 118 ms
55,764 KB
testcase_02 AC 124 ms
55,908 KB
testcase_03 AC 119 ms
55,648 KB
testcase_04 AC 119 ms
55,916 KB
testcase_05 AC 117 ms
56,104 KB
testcase_06 AC 117 ms
55,772 KB
testcase_07 AC 120 ms
55,668 KB
testcase_08 AC 118 ms
55,624 KB
testcase_09 AC 119 ms
55,716 KB
testcase_10 AC 119 ms
55,776 KB
testcase_11 AC 118 ms
55,916 KB
testcase_12 AC 119 ms
56,080 KB
testcase_13 AC 118 ms
55,412 KB
testcase_14 AC 118 ms
56,008 KB
testcase_15 AC 119 ms
55,868 KB
testcase_16 AC 120 ms
55,804 KB
testcase_17 AC 120 ms
55,856 KB
testcase_18 AC 125 ms
55,624 KB
testcase_19 AC 118 ms
55,696 KB
testcase_20 AC 122 ms
55,792 KB
testcase_21 AC 118 ms
55,532 KB
testcase_22 AC 118 ms
56,208 KB
testcase_23 AC 121 ms
57,372 KB
testcase_24 AC 119 ms
55,912 KB
testcase_25 AC 118 ms
56,004 KB
testcase_26 AC 123 ms
55,788 KB
testcase_27 AC 118 ms
56,000 KB
testcase_28 AC 119 ms
55,756 KB
testcase_29 AC 118 ms
55,812 KB
testcase_30 AC 121 ms
55,392 KB
testcase_31 AC 126 ms
55,920 KB
権限があれば一括ダウンロードができます

ソースコード

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