結果
| 問題 |
No.637 X: Yet Another FizzBuzz Problem
|
| コンテスト | |
| ユーザー |
e869120
|
| 提出日時 | 2018-01-26 22:40:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 464 bytes |
| コンパイル時間 | 622 ms |
| コンパイル使用メモリ | 83,248 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 18:48:43 |
| 合計ジャッジ時間 | 1,402 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <functional>
#include <cmath>
#include <tuple>
using namespace std;
#pragma warning (disable: 4996)
int a, s;
int func(int p) {
if (p % 15 == 0) return 8;
if (p % 5 == 0) return 4;
if (p % 3 == 0) return 4;
return to_string(p).size();
}
int main() {
for (int i = 0; i < 5; i++) { cin >> a; s += func(a); }
cout << s << endl;
return 0;
}
e869120