結果
問題 |
No.637 X: Yet Another FizzBuzz Problem
|
ユーザー |
![]() |
提出日時 | 2018-03-19 22:29:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 690 ms |
コンパイル使用メモリ | 80,892 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 19:01:09 |
合計ジャッジ時間 | 1,522 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <map> #include <queue> #include <cmath> #include <stack> int main (void){ int count = 0; for (size_t i = 0; i < 5; i++) { int num; std::cin >> num; if (num % 3 == 0) { count += 4; } if (num % 5 == 0) { count += 4; } if (num % 3 != 0 && num % 5 != 0) { count += (int)log10(num) + 1; } } std::cout << count << std::endl; return 0; }