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