結果
問題 | No.311 z in FizzBuzzString |
ユーザー |
![]() |
提出日時 | 2015-12-04 19:10:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,500 ms |
コード長 | 231 bytes |
コンパイル時間 | 117 ms |
コンパイル使用メモリ | 22,144 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 21:17:22 |
合計ジャッジ時間 | 653 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: 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("%lld\n", v);return 0;}