結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー newcomer
提出日時 2018-02-09 02:16:19
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 431 ms
コンパイル使用メモリ 55,444 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-01 21:17:20
合計ジャッジ時間 1,443 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;


int main()
{
	int n;
	int sum = 0;

	for (int i = 0; i < 5; i++) {

		cin >> n;

		if (n % 15 == 0) {
			sum += 8;
		}

		else if (n % 3 == 0) {
			sum += 4;
		}

		else if (n % 5 == 0) {
			sum += 4;
		}

		else {
			sum += n;
		}
	}
	cout << sum << endl;

	return 0;
}

0