結果
問題 | No.637 X: Yet Another FizzBuzz Problem |
ユーザー |
|
提出日時 | 2019-09-17 16:08:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 421 bytes |
コンパイル時間 | 1,437 ms |
コンパイル使用メモリ | 167,336 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 13:15:50 |
合計ジャッジ時間 | 2,416 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int a; int ct = 0; for (int i = 0; i < 5; i++) { cin >> a; if (a % 3 == 0){ ct += 4; } if (a % 5 == 0){ ct += 4; } if (a % 3 != 0 && a % 5 != 0) { ct += to_string(a).length(); } } cout << ct << endl; return 0; }