結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2015-08-26 13:13:23 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 283 bytes |
コンパイル時間 | 105 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 14:41:14 |
合計ジャッジ時間 | 641 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%lld %lld %lld", &F0, &F1, &N); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(void){long long F0, F1, F2, N;scanf("%lld %lld %lld", &F0, &F1, &N);if(N%3 == 0){printf("%lld\n", F0);}else if(N%3 == 1){printf("%lld\n", F1);}else{F2 = F0 ^ F1;printf("%lld\n", F2);}return 0;}