結果
| 問題 | No.311 z in FizzBuzzString |
| コンテスト | |
| ユーザー |
FF256grhy
|
| 提出日時 | 2015-12-04 19:07:57 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 229 bytes |
| 記録 | |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-24 21:17:14 |
| 合計ジャッジ時間 | 711 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
9 | printf("%d\n", v);
| ~^ ~
| | |
| int long long int
| %lld
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%lld", &n);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include <stdio.h>
long long int a[15] = {0, 0, 0, 2, 2, 4, 6, 6, 6, 8, 10, 10, 12, 12, 12};
int main(void) {
long long int n;
scanf("%lld", &n);
long long int v = (n / 15) * 16 + a[n % 15];
printf("%d\n", v);
return 0;
}
FF256grhy