結果
問題 | No.637 X: Yet Another FizzBuzz Problem |
ユーザー |
![]() |
提出日時 | 2018-01-26 22:27:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 949 bytes |
コンパイル時間 | 1,855 ms |
コンパイル使用メモリ | 187,624 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 18:48:14 |
合計ジャッジ時間 | 2,488 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
#define _GLIBCXX_DEBUG#include <bits/stdc++.h>using namespace std;#ifdef _DEBUG#include "dump.hpp"#else#define dump(...)#endif//#define int long long#define DBG 1#define rep(i,a,b) for(int i=(a);i<(b);i++)#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)#define loop(n) rep(loop,(0),(n))#define all(c) begin(c),end(c)const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;const int MOD = (int)(1e9) + 7;const double PI = acos(-1);const double EPS = 1e-9;template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }template<class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return true; } return false; }signed main() {cin.tie(0);ios::sync_with_stdio(false);int ans=0;rep(i,0,5){int a; cin >> a;if(a%15==0)ans+=8;else if(a%5==0||a%3==0)ans+=4;else ans+=to_string(a).length();}cout<<ans<<endl;return 0;}