結果
| 問題 |
No.311 z in FizzBuzzString
|
| コンテスト | |
| ユーザー |
pmx_x
|
| 提出日時 | 2019-07-12 15:36:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 251 bytes |
| コンパイル時間 | 1,534 ms |
| コンパイル使用メモリ | 166,904 KB |
| 実行使用メモリ | 13,760 KB |
| 最終ジャッジ日時 | 2024-09-24 22:23:48 |
| 合計ジャッジ時間 | 4,542 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 TLE * 1 -- * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,ans = 0;
cin >> N;
for (int i = 1; i <= N; i++)
{
if(i % 3 == 0 && i %5 == 0){
ans += 4;
}else if(i%3 == 0 || i%5 == 0){
ans += 2;
}
}
cout << ans << endl;
}
pmx_x