結果
問題 | No.1595 The Final Digit |
ユーザー |
|
提出日時 | 2023-07-20 14:24:58 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 884 ms |
コンパイル使用メモリ | 28,160 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-20 10:37:22 |
合計ジャッジ時間 | 4,272 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 4 TLE * 1 -- * 12 |
ソースコード
#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; }