結果
問題 | No.637 X: Yet Another FizzBuzz Problem |
ユーザー |
![]() |
提出日時 | 2018-05-25 00:47:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 1,536 ms |
コンパイル使用メモリ | 168,720 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 19:06:09 |
合計ジャッジ時間 | 2,450 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
コンパイルメッセージ
main.cpp:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 11 | main(){ | ^~~~
ソースコード
#include<bits/stdc++.h> typedef long long ll; using namespace std; int INF = 1LL << 30; int MOD = 1e9+7; string to_str(ll A){ stringstream ss; ss << A; return ss.str(); } main(){ int sum = 0,a; for(int i = 0;i < 5;i++){ cin >> a; if(a % 3 != 0 && a % 5 != 0)sum += to_str(a).size(); else if(a % 15 == 0)sum += 8; else sum += 4; } cout << sum << endl; }