結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem |
| コンテスト | |
| ユーザー |
dgd1724
|
| 提出日時 | 2018-07-21 20:24:37 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 362µs | |
| コード長 | 485 bytes |
| 記録 | |
| コンパイル時間 | 374 ms |
| コンパイル使用メモリ | 91,896 KB |
| 実行使用メモリ | 9,844 KB |
| 最終ジャッジ日時 | 2026-10-08 03:40:52 |
| 合計ジャッジ時間 | 1,864 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
#include <fstream>
#include <iostream>
#include <vector>
#include <cmath>
int main() {
//std::ifstream inf("Text.txt"); std::cin.rdbuf(inf.rdbuf());
int ans = 0;
std::vector<int> a(5);
for (int i = 0; i < 5; i++) {
std::cin >> a[i];
if (a[i] % 15 == 0) {
ans += 8;
}
else if (a[i] % 5 == 0) {
ans += 4;
}
else if (a[i] % 3 == 0) {
ans += 4;
}
else {
ans += static_cast<int>(std::log10(a[i]) + 1);
}
}
std::cout << ans << std::endl;
return 0;
}
dgd1724