結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー Yug_min_null
提出日時 2021-09-04 01:56:49
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 345 bytes
コンパイル時間 2,236 ms
コンパイル使用メモリ 185,624 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-15 23:13:03
合計ジャッジ時間 3,472 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

int main() {
  int ans = 0;
  for(int i = 0; i < 5; i++){
    int A; cin >> A;
    if(A%15 == 0) ans += 8;
    else if(A%3 == 0 or A%5 == 0) ans += 4;
    else{
      if(100 <= A) ans += 3;
      else if(10 <= A) ans += 2;
      else ans++;
    }
  }
  cout << ans << endl;
}
0