結果
問題 | No.1595 The Final Digit |
ユーザー | sin |
提出日時 | 2023-07-20 14:24:58 |
言語 | C (gcc 12.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 29,444 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-20 15:07:32 |
合計ジャッジ時間 | 4,955 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,348 KB |
testcase_01 | AC | 1 ms
4,348 KB |
testcase_02 | AC | 1 ms
4,348 KB |
testcase_03 | AC | 1 ms
4,348 KB |
testcase_04 | TLE | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
#include<stdio.h> int main(){ int p,q,r; long long int K; int i; scanf("%d%*c%d%*c%d%*c%lld",&p,&q,&r,&K); int A[4]={p,q,r,(p+q+r)%10}; for(i=0;i<K-4;i++){ A[0]=A[1]; A[1]=A[2]; A[2]=A[3]; A[3]=(A[0]+A[1]+A[2])%10; } printf("%d",A[3]); return 0; }